-
Notifications
You must be signed in to change notification settings - Fork 24
46 lines (44 loc) · 1.26 KB
/
release.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
44
45
46
name: release to quay.io
on:
push:
tags: [v*]
env:
REGISTRY_USER: netobserv+github_ci
REGISTRY_PASSWORD: ${{ secrets.QUAY_SECRET }}
REGISTRY: quay.io/netobserv
IMAGE: flowlogs-pipeline
jobs:
push-image:
name: push image
runs-on: ubuntu-latest
strategy:
matrix:
go: ['1.19']
steps:
- name: checkout
uses: actions/checkout@v3
- name: validate tag
run: |
tag=`git describe --exact-match --tags 2> /dev/null`
if [[ $tag =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-rc[0-9]+)?$ ]]; then
echo "$tag is a valid release tag"
set -e
echo "tag=$tag" >> $GITHUB_ENV
else
echo "$tag is NOT a valid release tag"
exit 1
fi
- name: install make
run: sudo apt-get install make
- name: set up go 1.x
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- name: docker login to quay.io
uses: docker/login-action@v2
with:
username: ${{ env.REGISTRY_USER }}
password: ${{ env.REGISTRY_PASSWORD }}
registry: quay.io
- name: build and push images
run: OCI_RUNTIME=docker DOCKER_TAG=${{ env.tag }} make push-multiarch-manifest