From b9114aaa99498e940ce68975facf439da530a00f Mon Sep 17 00:00:00 2001 From: Bart Geesink Date: Thu, 7 Dec 2023 11:07:11 +0100 Subject: [PATCH] GHA test image: Add labels and tags --- .../build-push-test-docker-image.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-push-test-docker-image.yml b/.github/workflows/build-push-test-docker-image.yml index 3d6122a54..74440c1b6 100644 --- a/.github/workflows/build-push-test-docker-image.yml +++ b/.github/workflows/build-push-test-docker-image.yml @@ -18,7 +18,6 @@ jobs: - name: Build the app uses: openconext/build-and-publish-test-container/php72-node14@main with: - dir_to_include: 'tests/' use_yarn: false - name: Set up QEMU @@ -33,6 +32,20 @@ jobs: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} + + - name: Set docker labels and tags + id: meta + uses: docker/metadata-action@v5 + with: + images: ghcr.io/openconext/stepup-middleware/stepup-middleware + flavor: | + latest=false + suffix=-test + tags: | + type=ref,event=tag + type=semver,pattern={{version}} + type=sha + type=raw,suffix=,value=test - name: Build and push the TEST image uses: docker/build-push-action@v4 @@ -41,5 +54,5 @@ jobs: file: docker/Dockerfile.test platforms: linux/amd64,linux/arm64 push: true - tags: | - ghcr.io/openconext/stepup-middleware/stepup-middleware:test + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }}