diff --git a/.github/workflows/dockerhub.yml b/.github/workflows/dockerhub.yml index 1d3b08c..8ae3bca 100644 --- a/.github/workflows/dockerhub.yml +++ b/.github/workflows/dockerhub.yml @@ -19,4 +19,4 @@ jobs: steps: - uses: actions/checkout@v4 - name: Pull the latest ${{ matrix.platform }} image - run: docker pull --platform ${{ matrix.platform }} leplusorg/pgp-verify-jar + run: docker pull --platform ${{ matrix.platform }} ${{ github.repository_owner }}/pgp-verify-jar diff --git a/.github/workflows/dockerimage.yml b/.github/workflows/dockerimage.yml index 92d7961..580fcf7 100644 --- a/.github/workflows/dockerimage.yml +++ b/.github/workflows/dockerimage.yml @@ -21,14 +21,27 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} + - uses: docker/metadata-action@v5 + id: meta + with: + images: ${{ github.repository_owner }}/yaml + tags: | + type=schedule + type=ref,event=branch + type=ref,event=pr + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} + type=sha - uses: docker/build-push-action@v5 with: context: pgp-verify-jar platforms: linux/amd64,linux/arm64 pull: true - push: true + push: ${{ github.event_name != 'pull_request' }} sbom: true - tags: leplusorg/pgp-verify-jar:latest + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} - name: Test the Docker image working-directory: pgp-verify-jar run: docker compose -f docker-compose.test.yml run sut