Skip to content

Commit

Permalink
Update maven-docker.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
keke125 committed May 28, 2023
1 parent 77eedde commit 60339af
Showing 1 changed file with 40 additions and 1 deletion.
41 changes: 40 additions & 1 deletion .github/workflows/maven-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ on:
- 'main'
tags:
- 'v*.*.*'
env:
REGISTRY_IMAGE: keke125/pixel-art-filter-web

jobs:
build:

Expand All @@ -36,7 +39,7 @@ jobs:
# list of Docker images to use as base name for tags
images: |
keke125/pixel-art-filter-web
ghcr.io/keke125/pixel-art-filter-web
# ghcr.io/keke125/pixel-art-filter-web
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
Expand Down Expand Up @@ -80,3 +83,39 @@ jobs:
path: /tmp/digests/*
if-no-files-found: error
retention-days: 1
merge:
runs-on: ubuntu-latest
needs:
- build
steps:
-
name: Download digests
uses: actions/download-artifact@v3
with:
name: digests
path: /tmp/digests
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY_IMAGE }}
-
name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Create manifest list and push
working-directory: /tmp/digests
run: |
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
$(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
-
name: Inspect image
run: |
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }}

0 comments on commit 60339af

Please sign in to comment.