-
Notifications
You must be signed in to change notification settings - Fork 0
25 lines (23 loc) · 851 Bytes
/
ci.yml
File metadata and controls
25 lines (23 loc) · 851 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
name: CI
"on": push
jobs:
build:
runs-on: ubuntu-latest
environment: ${{ case(github.ref == 'refs/heads/master' || github.ref_type == 'tag', 'release', null) }}
steps:
- uses: actions/checkout@v6
- uses: docker/setup-qemu-action@v4
- uses: docker/setup-buildx-action@v4
# Login only when the DOCKERHUB_USERNAME variable is provided via the job environment
- if: vars.DOCKERHUB_USERNAME != null
uses: docker/login-action@v4
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: docker/bake-action@v7
with:
targets: all
push: ${{ vars.DOCKERHUB_USERNAME != null }}
env:
PLATFORMS: linux/amd64,linux/arm64
TAG: ${{ github.ref_type == 'tag' && github.ref_name || '' }}