Skip to content

Commit

Permalink
Update ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
norefice-github authored Apr 26, 2024
1 parent 239b535 commit fc5b36e
Showing 1 changed file with 6 additions and 17 deletions.
23 changes: 6 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,10 @@ jobs:
run: |
platform=${{ matrix.platform }}
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
- name: Checkout repository
uses: actions/checkout@v3
with:
ref: ${{ env.SHA }}

- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v4
Expand All @@ -49,19 +47,15 @@ jobs:
labels: |
org.opencontainers.image.revision=${{ env.SHA }}
com.docker.image.source.entrypoint=${{ env.DOCKERFILE_PATH }}
- name: Docker Setup QEMU
uses: docker/[email protected]

- name: Setup Docker buildx
uses: docker/setup-buildx-action@v2

- name: Log into DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push by digest
id: build
uses: docker/build-push-action@v5
Expand All @@ -87,35 +81,30 @@ jobs:
needs:
- build
steps:
-
name: Download digests
- name: Download digests
uses: actions/download-artifact@v4
with:
path: /tmp/digests
pattern: digests-*
merge-multiple: true
-
name: Set up Docker Buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Docker meta
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY_IMAGE }}
-

- name: Log into DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
-
name: Create manifest list and push
- 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
- name: Inspect image
run: |
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${

0 comments on commit fc5b36e

Please sign in to comment.