-
Notifications
You must be signed in to change notification settings - Fork 6
48 lines (41 loc) · 1.23 KB
/
docker-build.yaml
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
44
45
46
47
48
name: build docker image
on:
push:
branches: main
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# We use setuptools-scm to do versioning, and it needs a full clone
fetch-depth: "0"
- name: Figure out docker image tag
id: taggen
uses: docker/metadata-action@v5
with:
images: |
quay.io/yuvipanda/z2jh-hub-with-fancy-profiles
tags: |
prefix=z2jh-v3.2.1-fancy-profiles-sha-,type=sha
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Quay.io
uses: docker/login-action@v1
# Run this only on merge
if: "${{ github.event_name == 'push' }}"
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: .
push: "${{ github.event_name == 'push' }}"
tags: ${{ steps.taggen.outputs.tags }}
- name: Image Tag
run: echo ${{ steps.taggen.outputs.tags }}