ci: publish the image built by the pipeline
This commit is contained in:
1 parent
186c21b775
commit
c14f71be02
2 files changed
+10
-4
No files matched your search
@@ -84,7 +84,6 @@ jobs:
|
||||
docker build --pull --label "org.opencontainers.image.revision=$(git rev-parse HEAD)" \
|
||||
-t "$IMAGE:${{ steps.meta.outputs.tag }}" .
|
||||
docker image inspect "$IMAGE:${{ steps.meta.outputs.tag }}" --format '{{.Id}}'
|
||||
docker save "$IMAGE:${{ steps.meta.outputs.tag }}" > /dev/null
|
||||
- name: Record digest
|
||||
run: echo "digest=$(docker image inspect "$IMAGE:${{ steps.meta.outputs.tag }}" --format '{{.Id}}')" >> "$GITHUB_OUTPUT"
|
||||
id: digest
|
||||
@@ -140,11 +139,13 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Log in with the package token
|
||||
run: echo "${{ secrets.REGISTRY_TOKEN }}" | docker login git.eeee.moe -u omar --password-stdin
|
||||
- name: Push the immutable tag
|
||||
- name: Push the immutable tag built above
|
||||
run: |
|
||||
set -euo pipefail
|
||||
docker build -t "$IMAGE:${{ needs.image.outputs.tag }}" .
|
||||
docker push "$IMAGE:${{ needs.image.outputs.tag }}"
|
||||
image="$IMAGE:${{ needs.image.outputs.tag }}"
|
||||
docker image inspect "$image" > /dev/null
|
||||
docker push "$image"
|
||||
docker image inspect "$image" --format '{{.RepoDigests}}'
|
||||
- name: Move latest only if HEAD has not moved
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
Reference in new issue
Block a user