@@ -14,19 +14,24 @@ jobs:
1414 build :
1515 name : Build
1616 runs-on : firecracker
17+ permissions :
18+ contents : write
19+ packages : write
1720 steps :
18- - uses : actions/checkout@v1
21+ - uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
22+ with :
23+ fetch-depth : 0
1924
2025 - name : Set up Go 1.25
21- uses : actions/setup-go@v5
26+ uses : actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0
2227 with :
2328 go-version : ' 1.25'
2429 id : go
2530
2631 - name : Prepare git
2732 env :
28- GITHUB_USER : 1gtm
29- GITHUB_TOKEN : ${{ secrets.LGTM_GITHUB_TOKEN }}
33+ GITHUB_USER : ${{ github.actor }}
34+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
3035 run : |
3136 set -x
3237 git config --global user.name "${GITHUB_USER}"
@@ -47,21 +52,32 @@ jobs:
4752
4853 - name : Set up QEMU
4954 id : qemu
50- uses : docker/setup-qemu-action@v3
55+ uses : docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
5156 with :
5257 cache-image : false
5358
5459 - name : Set up Docker Buildx
55- uses : docker/setup-buildx-action@v3
60+ uses : docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
61+
62+ - uses : actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3
63+ id : app-token
64+ with :
65+ client-id : ${{ secrets.GHCRX_APP_CLIENT_ID }}
66+ private-key : ${{ secrets.GHCRX_APP_PRIVATE_KEY }}
67+ owner : appscode
68+
69+ - name : Login to GitHub Container Registry
70+ uses : docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
71+ with :
72+ registry : ghcr.io
73+ username : ${{ steps.app-token.outputs.app-slug }}[bot]
74+ password : ${{ steps.app-token.outputs.token }}
5675
5776 - name : Publish to GitHub Container Registry
5877 env :
5978 REGISTRY : ghcr.io/appscode
60- DOCKER_TOKEN : ${{ secrets.LGTM_GITHUB_TOKEN }}
61- USERNAME : 1gtm
6279 APPSCODE_ENV : prod
6380 run : |
64- docker login ghcr.io --username ${USERNAME} --password ${DOCKER_TOKEN}
6581 make release COMPRESS=yes
6682
6783# - name: Publish to Red Hat Ecosystem Catalog
7591# make docker-certify-redhat
7692
7793 - name : Release
78- uses : softprops/action-gh-release@v1
94+ uses : softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2.6.2
7995 if : startsWith(github.ref, 'refs/tags/')
8096 with :
8197 files : |
0 commit comments