From 63e5b654515748fbbdf611857b28584ced9aa218 Mon Sep 17 00:00:00 2001 From: Gergely Risko Date: Tue, 31 Oct 2023 13:43:22 +0100 Subject: [PATCH] Log successful runs to a branch --- .github/workflows/docker-build-push.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/docker-build-push.yaml b/.github/workflows/docker-build-push.yaml index 8b9fc11..e1f2b4d 100644 --- a/.github/workflows/docker-build-push.yaml +++ b/.github/workflows/docker-build-push.yaml @@ -33,6 +33,7 @@ jobs: - name: Checkout code uses: actions/checkout@v3 + fetch-depth: '0' - name: Set up QEMU uses: docker/setup-qemu-action@v2 @@ -77,6 +78,20 @@ jobs: provenance: false sbom: false + - name: Log run info to a branch + # This provides a branch where it's easy to see if a build + # succeeded for a commit hash. A happy side-effect might also + # be, that thanks to this branch, our automatic scheduled builds + # will hopefully not be deactivated after 60 days... We need + # that anyway, because we want to apply security updates from + # nilcons/debian automtaically once a month. + run: | + git checkout actions-log + touch ${{ github.sha }} + git add ${{ github.sha }} + git commit -m 'Pipeline finished' + git push + # We have this env section at the end, because the weird quoting that # is needed inside of it is breaking emacs highlight behind it... env: