blob: 5ca0154901f1a4a3b4ad3f20fec5174634ad698f [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
Mohammed Naser77aacf02023-09-18 18:01:52 +000024 - uses: actions/checkout@v4
Mohammed Naserff534a02023-09-18 17:57:24 +000025 - uses: docker/metadata-action@v5
26 id: meta
ricolincc4a0f02023-08-03 11:27:22 +080027 with:
Mohammed Naserff534a02023-09-18 17:57:24 +000028 images: ghcr.io/vexxhost/staffeln
29 - uses: docker/login-action@v3
30 if: github.event_name != 'pull_request'
ricolincc4a0f02023-08-03 11:27:22 +080031 with:
Mohammed Naserff534a02023-09-18 17:57:24 +000032 registry: ghcr.io
33 username: ${{ github.actor }}
34 password: ${{ secrets.GITHUB_TOKEN }}
35 - uses: docker/build-push-action@v5
ricolincc4a0f02023-08-03 11:27:22 +080036 with:
Mohammed Naser77aacf02023-09-18 18:01:52 +000037 context: .
Mohammed Naserff534a02023-09-18 17:57:24 +000038 push: ${{ github.event_name != 'pull_request' }}
39 labels: ${{ steps.meta.outputs.labels }}
40 tags: ${{ steps.meta.outputs.tags }}