forked from kubewharf/kubeadmiral
-
Notifications
You must be signed in to change notification settings - Fork 2
43 lines (37 loc) · 982 Bytes
/
docker-build.yml
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Build docker image
on:
push:
tags: "*"
branches: ["main", "ci-test"]
permissions:
packages: write
jobs:
image:
name: Build docker image
runs-on: [ubuntu-20.04]
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v3
- name: Docker login for ghcr
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{github.token}}
- name: Set image tag for release
id: tag
run: |
if [[ ${{github.ref_type}} == tag ]]; then
echo "tag=${{github.ref_name}}"
else
echo "tag=dev"
fi >>$GITHUB_OUTPUT
- name: Build docker image
env:
REGISTRY: ghcr.io/kubewharf
TAG: ${{ steps.tag.outputs.tag }}
ARCHS: amd64
OUTPUT_TYPE: registry
run: bash hack/make-rules/build-images.sh