99 REGISTRY : amu.subject.moe
1010 # github.repository as <account>/<repo>
1111 WEB_IMAGE : cosette-lite
12- BOT_IMAGE : cosette-bot
1312 GITLAB_USER : subject
1413
1514jobs :
5049 file : ./apps/webstack/Dockerfile
5150 push : ${{ github.event_name != 'pull_request' }}
5251 tags : ${{ steps.meta.outputs.tags }}
53- labels : ${{ steps.meta.outputs.labels }}
54-
55- build-bot :
56- runs-on : ubuntu-latest
57- steps :
58- - name : Checkout repository
59- uses : actions/checkout@v3
60-
61- - name : Setup Docker buildx
62- uses : docker/setup-buildx-action@v2
63-
64- # Login against a Docker registry except on PR
65- # https://github.com/docker/login-action
66- - name : Log into registry ${{ env.REGISTRY }}
67- if : github.event_name != 'pull_request'
68- uses : docker/login-action@v2
69- with :
70- registry : ${{ env.REGISTRY }}
71- username : ${{ env.GITLAB_USER }}
72- password : ${{ secrets.GITLAB_REGISTRY_TOKEN }}
73-
74- # Extract metadata (tags, labels) for Docker
75- # https://github.com/docker/metadata-action
76- - name : Extract Docker metadata
77- id : meta
78- uses : docker/metadata-action@v4.3.0
79- with :
80- images : ${{ env.REGISTRY }}/${{ env.GITLAB_USER }}/oth-verification/${{ env.BOT_IMAGE }}
81-
82- # Build and push Docker image with Buildx (don't push on PR)
83- # https://github.com/docker/build-push-action
84- - name : Build and push Docker image
85- id : build-and-push
86- uses : docker/build-push-action@v4
87- with :
88- context : .
89- file : ./apps/discordbot/Dockerfile
90- push : ${{ github.event_name != 'pull_request' }}
91- tags : ${{ steps.meta.outputs.tags }}
9252 labels : ${{ steps.meta.outputs.labels }}
0 commit comments