Merge pull request #300 from qinqon/remove-github-actions-snyk #96
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |