File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55 branches : ' *'
66
77env :
8- cr_image : ghcr.io/${{ github.repository }}/build
8+ # ERROR: failed to build: invalid tag "ghcr.io/HenriWahl/checkmk-agent-plugin-yum/build:build-image": repository name must be lowercase
9+ # this is the penalty for using uppercase letters in repository names...
10+ cr_image : ghcr.io/henriwahl/checkmk-agent-plugin-yum/build:${{ github.run_id }}
911
1012jobs :
1113 build-image :
1214 runs-on : ubuntu-latest
1315 steps :
1416 - uses : actions/checkout@v4
17+ # docker login is needed for pushing the test image
18+ - uses : docker/login-action@v3
19+ with :
20+ registry : ghcr.io
21+ username : ${{ github.actor }}
22+ password : ${{ secrets.GITHUB_TOKEN }}
23+ # somehow weird way to get the hash over the requirements to be aware if they changed
24+ - id : get_hash
25+ run : echo "HASH=$(ls -l | md5sum ) | cut -d\ -f1)" >> $GITHUB_OUTPUT
1526 # build container image for package creation
16- - run : docker pull ${{ env.cr_image }}:${{ github.job }} || docker build -t ${{ env.cr_image }}:${{ github.job }} -f dockerfiles/checkmk/Dockerfile .
17- - run : docker push ${{ env.cr_image }}:${{ github.job }}
27+ - run : docker pull ${{ env.cr_image }}:${{ steps.get_hash.outputs.HASH }} || docker build -t ${{ env.cr_image }}:${{ steps.get_hash.outputs.HASH }} -f dockerfiles/checkmk/Dockerfile .
28+ - run : docker push ${{ env.cr_image }}:${{ steps.get_hash.outputs.HASH }}
1829
1930# build-package:
2031# runs-on: ubuntu-latest
You can’t perform that action at this time.
0 commit comments