test build

Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com>
This commit is contained in:
Josh Kneubuhl 2022-11-15 08:24:15 -05:00
parent 7cef67643a
commit 8eb484034c
2 changed files with 14 additions and 6 deletions

View file

@ -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 }}

View file

@ -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
```