Skip to content

Commit

Permalink
feat: fix nightly (#402)
Browse files Browse the repository at this point in the history
  • Loading branch information
zifeo committed Aug 22, 2023
1 parent f2a5ea4 commit c866911
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 21 deletions.
23 changes: 9 additions & 14 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ jobs:
cache-from: type=registry,ref=${{ env.REGISTRY_IMAGE }}:base
outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true
- run: |
mkdir -p tmp/digests/dev
mkdir -p digests/dev
digest="${{ steps.dev.outputs.digest }}"
touch "tmp/digests/dev/${digest#sha256:}"
touch "digests/dev/${digest#sha256:}"
- uses: docker/build-push-action@v4
id: prd
with:
Expand All @@ -47,13 +47,13 @@ jobs:
cache-from: type=registry,ref=${{ env.REGISTRY_IMAGE }}:nightly
outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true
- run: |
mkdir -p tmp/digests/prd
mkdir -p digests/prd
digest="${{ steps.prd.outputs.digest }}"
touch "tmp/digests/prd/${digest#sha256:}"
touch "digests/prd/${digest#sha256:}"
- uses: actions/upload-artifact@v3
with:
name: digests
path: tmp/digests/*
path: ./digests/*
if-no-files-found: error
retention-days: 1

Expand All @@ -73,22 +73,17 @@ jobs:
- uses: actions/download-artifact@v3
with:
name: digests
path: tmp/digests
path: ./digests
- uses: docker/setup-buildx-action@v2
- id: info
run: |
VAR="${{ matrix.target }}_IMAGE"
VAR=${VAR^^}
echo "image=${!VAR}" >> "$GITHUB_OUTPUT"
- uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- run: |
cd tmp/digests/${{ matrix.target }}
docker buildx imagetools create --tag ${{ steps.info.outputs.image }}:${{ matrix.tag }} $(printf '${{ steps.info.outputs.image }}@sha256:%s ' *)
docker buildx imagetools inspect ${{ steps.info.outputs.image }}:${{ matrix.tag }}
cd ./digests/${{ matrix.target }}
docker buildx imagetools create --tag ${{ env.REGISTRY_IMAGE }}:${{ matrix.tag }} $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ matrix.tag }}
cleaner:
needs:
Expand Down
14 changes: 7 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c866911

Please sign in to comment.