-
Notifications
You must be signed in to change notification settings - Fork 34
41 lines (39 loc) · 1.12 KB
/
publish.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
name: publish
on:
push:
branches:
- main
tags:
- 'v*.*.*'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
env:
VERSION: ${{github.ref_name}}
REGISTRY: quay.io/kubevirt
steps:
- uses: actions/checkout@v2
- uses: arnested/go-version-action@v1
id: go-versions
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: ${{ steps.go-versions.outputs.minimal }}
- name: Logging to quay.io
run:
docker login -u ${{ secrets.QUAY_USER }} -p ${{ secrets.QUAY_TOKEN }} quay.io
- name: Build and push image
run: make image push
- name: Tag manifests
if: startsWith(github.ref, 'refs/tags/')
run: |
sed -i "s/main/${{github.ref_name}}/" $(git grep -l :main config/)
tar -cvzf kustomize.tar.gz config
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
generate_release_notes: true
files: kustomize.tar.gz