@@ -3,33 +3,47 @@ name: "Build bot-client image"
33on :
44 workflow_dispatch :
55 push :
6- tags :
7- - ' **'
6+ branches :
7+ - dev
8+ - v2
9+ - " event-*"
10+ - " rush-*"
811
912permissions :
1013 contents : read
14+ packages : write
1115
1216concurrency :
13- group : ' ${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }} '
17+ group : " ${{ github.workflow }} @ ${{ github.ref_name }}-${{ github.sha }} "
1418 cancel-in-progress : true
1519
1620jobs :
17- checkout :
21+ build-bot-client-image :
1822 runs-on : self-hosted
1923 env :
2024 PATH : " /vscode/vscode-server/bin/linux-x64/e7e037083ff4455cf320e344325dacb480062c3c/bin/remote-cli:/root/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
2125 steps :
2226 - name : Checkout
2327 uses : actions/checkout@v4
2428 with :
25- submodules : ' true'
29+ submodules : " true"
2630
27- - name : Login to Registry
31+ - name : Login to GitHub Container Registry
2832 uses : docker/login-action@v3
2933 with :
30- registry : registry.coregame.de
31- username : ${{ secrets.REGISTRY_USERNAME }}
32- password : ${{ secrets.REGISTRY_PASSWORD }}
34+ registry : ghcr.io
35+ username : ${{ github.actor }}
36+ password : ${{ secrets.GITHUB_TOKEN }}
37+
38+ - name : Set up QEMU
39+ uses : docker/setup-qemu-action@v3
40+
41+ - name : Set up Docker Buildx
42+ uses : docker/setup-buildx-action@v3
43+
44+ - name : Set sha short
45+ id : vars
46+ run : echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
3347
3448 - name : Build and push
3549 uses : docker/build-push-action@v5
3852 file : ./.github/workflows/Dockerfile
3953 platforms : linux/amd64, linux/arm64
4054 push : true
41- tags : registry.coregame.de/core/bot-client:${{ github.ref_name }}, registry.coregame.de/core/bot-client:latest
55+ build-args : |
56+ TAG_NAME=${{ github.ref_name }}
57+ tags : |
58+ ghcr.io/42core-team/bot-client:${{ github.ref_name }}
59+ ghcr.io/42core-team/bot-client:${{ github.ref_name }}-${{ steps.vars.outputs.sha_short }}
0 commit comments