forked from dexidp/dex
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (42 loc) · 1.24 KB
/
docker.yml
File metadata and controls
50 lines (42 loc) · 1.24 KB
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
49
50
name: Build and Push Docker Image
on:
push:
tags:
- "v*"
- "publish-image*"
branches:
- master
env:
REGISTRY: quay.io
HELM_REGISTRY: quay.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push:
runs-on: ubuntu-24.04
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
# Fetch all history for all tags and branches. Our image tag generation uses git tags.
# We could have just used fetch-tags: true, but alas! This is broken. See:
# https://github.com/actions/checkout/issues/1471.
#
# So for now, we must fetch the full repository.
fetch-depth: 0
- name: Log in to Quay
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}
- name: List git tags
run: git tag -l | tee /dev/stderr
- name: Debug Git command
run: git describe --dirty --tags --match='v*'
- name: Build Docker image
run: make docker-build
- name: Push Docker image to Quay.io
run: make docker-push