-
Notifications
You must be signed in to change notification settings - Fork 9
35 lines (34 loc) · 995 Bytes
/
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
name: build
on:
push:
branches:
- "main"
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Login to GitHub Container Registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: galexrt
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Quay.io Container Registry
uses: docker/[email protected]
with:
registry: quay.io
username: ${{ secrets.REGISTRY_QUAYIO_USERNAME }}
password: ${{ secrets.REGISTRY_QUAYIO_PASSWORD }}
- name: Build Container Image
run: |
if [[ "${GITHUB_REF}" =~ ^refs/tags/* ]]; then
# Tags
VERSION="${GITHUB_REF/refs\/tags\//}"
else
# Branch
VERSION="${GITHUB_REF/refs\/heads\//}"
fi
make container-build container-push VERSION="${VERSION:-main}"