From 8eb484034c00ba214434c4124c4f807c8b98581e Mon Sep 17 00:00:00 2001 From: Josh Kneubuhl Date: Tue, 15 Nov 2022 08:24:15 -0500 Subject: [PATCH] test build Signed-off-by: Josh Kneubuhl --- .github/workflows/rest-sample.yaml | 19 +++++++++++++------ .../rest-api-typescript/README.md | 1 + 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/rest-sample.yaml b/.github/workflows/rest-sample.yaml index a000e7ab..63f54f7e 100644 --- a/.github/workflows/rest-sample.yaml +++ b/.github/workflows/rest-sample.yaml @@ -12,8 +12,10 @@ on: workflow_dispatch: push: branches: [ "main" ] + paths: [ "asset-transfer-basic/rest-api-typescript/**" ] pull_request: branches: [ "main" ] + paths: [ "asset-transfer-basic/rest-api-typescript/**" ] jobs: test-sample: @@ -52,11 +54,11 @@ jobs: with: images: | ${{ env.IMAGE_NAME }} - tags: | - type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} - type=semver,pattern={{major}} - type=sha,format=long + # todo: where shall we describe the revision of the sample component(s)? +# tags: | +# type=semver,pattern={{version}} +# type=semver,pattern={{major}} +# type=semver,pattern={{major}}.{{minor}} - name: Set up QEMU uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx @@ -73,6 +75,11 @@ jobs: with: context: asset-transfer-basic/rest-api-typescript platforms: linux/amd64,linux/arm64 - push: ${{ github.event_name != 'pull_request' }} + # todo: this is not right as it may try to publish on any push event + # push: ${{ github.event_name != 'pull_request' }} + + # todo: temp hack + push: ${{ github.event_name == 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file diff --git a/asset-transfer-basic/rest-api-typescript/README.md b/asset-transfer-basic/rest-api-typescript/README.md index f5e0953a..d4a75197 100644 --- a/asset-transfer-basic/rest-api-typescript/README.md +++ b/asset-transfer-basic/rest-api-typescript/README.md @@ -251,3 +251,4 @@ curl --include --header "Content-Type: application/json" --header "X-Api-Key: ${ ```shell curl --include --header "X-Api-Key: ${SAMPLE_APIKEY}" --request DELETE http://localhost:3000/api/assets/asset7 ``` +