Skip to content

Commit

Permalink
Log successful runs to a branch
Browse files Browse the repository at this point in the history
  • Loading branch information
errge committed Oct 31, 2023
1 parent be84c00 commit fa8c660
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/docker-build-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
build-push:
runs-on: ubuntu-latest
permissions:
contents: read
contents: write
packages: write

steps:
Expand Down Expand Up @@ -77,6 +77,23 @@ 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 fetch --no-write-fetch-head origin actions-log
git checkout actions-log
touch ${{ github.sha }}
git add ${{ github.sha }}
git config --global user.name Nilcons-Github-Action
git config --global user.email nilcons@users.noreply.github.com
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:
Expand Down

0 comments on commit fa8c660

Please sign in to comment.