diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 4767cee..a6e0518 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -16,6 +16,8 @@ jobs: options: --privileged env: STORAGE_DRIVER: vfs + outputs: + image_digest: ${{ steps.push.outputs.digest }} steps: - name: Install git run: dnf install -y --quiet git-core @@ -34,9 +36,12 @@ jobs: run: echo "$REGISTRY_PASSWORD" | podman login "$REGISTRY" -u "$REGISTRY_USERNAME" --password-stdin - name: Build and push + id: push run: | podman build --layers=false -t "$IMAGE:${{ github.sha }}" . - podman push "$IMAGE:${{ github.sha }}" + podman push "$IMAGE:${{ github.sha }}" --digestfile /tmp/img-digest + DIGEST=$(grep -oE '[a-f0-9]{64}' /tmp/img-digest) + echo "digest=$DIGEST" >> $GITHUB_OUTPUT bump-infra: needs: build @@ -47,6 +52,7 @@ jobs: FORGE_TOKEN: ${{ secrets.REGISTRY_PASSWORD }} FORGE_USER: ${{ secrets.REGISTRY_USERNAME }} SHA: ${{ github.sha }} + IMAGE_DIGEST: ${{ needs.build.outputs.image_digest }} run: | git clone "https://${FORGE_USER}:${FORGE_TOKEN}@forge.quinefoundation.com/Cold-Air-Networks/petersweb-infra.git" infra cd infra @@ -54,7 +60,7 @@ jobs: BRANCH="bump-riverside-${SHA:0:7}" git checkout -b "$BRANCH" - ./bump-riverside.sh "sha:$SHA" + ./bump-riverside.sh "$IMAGE_DIGEST" git config user.email "ci@quinefoundation.com" git config user.name "CI"