blob: 79c8a20eb886af7b6678504f638d46c97ecb500d [file] [log] [blame]
ricolincc4a0f02023-08-03 11:27:22 +08001name: build
Mohammed Naserff534a02023-09-18 17:57:24 +00002
ricolincc4a0f02023-08-03 11:27:22 +08003concurrency:
4 group: ${{ github.head_ref || github.run_id }}
5 cancel-in-progress: true
Mohammed Naserff534a02023-09-18 17:57:24 +00006
ricolincc4a0f02023-08-03 11:27:22 +08007on:
8 workflow_dispatch:
ricolincc4a0f02023-08-03 11:27:22 +08009 push:
10 branches:
Mohammed Naserd87ecd12023-09-18 17:58:08 +000011 - 'main'
Mohammed Naserff534a02023-09-18 17:57:24 +000012 tags:
13 - 'v*'
14 pull_request:
15 branches:
Mohammed Naserd87ecd12023-09-18 17:58:08 +000016 - 'main'
Mohammed Naserff534a02023-09-18 17:57:24 +000017
ricolincc4a0f02023-08-03 11:27:22 +080018jobs:
19 image:
20 runs-on: ubuntu-latest
ricolincc4a0f02023-08-03 11:27:22 +080021 steps:
Mohammed Naserff534a02023-09-18 17:57:24 +000022 - uses: docker/setup-qemu-action@v3
23 - uses: docker/setup-buildx-action@v3
24 - uses: docker/metadata-action@v5
25 id: meta
ricolincc4a0f02023-08-03 11:27:22 +080026 with:
Mohammed Naserff534a02023-09-18 17:57:24 +000027 images: ghcr.io/vexxhost/staffeln
28 - uses: docker/login-action@v3
29 if: github.event_name != 'pull_request'
ricolincc4a0f02023-08-03 11:27:22 +080030 with:
Mohammed Naserff534a02023-09-18 17:57:24 +000031 registry: ghcr.io
32 username: ${{ github.actor }}
33 password: ${{ secrets.GITHUB_TOKEN }}
34 - uses: docker/build-push-action@v5
ricolincc4a0f02023-08-03 11:27:22 +080035 with:
Mohammed Naserff534a02023-09-18 17:57:24 +000036 push: ${{ github.event_name != 'pull_request' }}
37 labels: ${{ steps.meta.outputs.labels }}
38 tags: ${{ steps.meta.outputs.tags }}