Skip to content

Commit

Permalink
infra: Add a gh actions to publish images
Browse files Browse the repository at this point in the history
After a PR is merged or main branch tagged a image should be pushed to
quay.io. This change add a github actions that do so and also add a
manual trigger to actionate from github actions menu or github CLI.

Signed-off-by: Enrique Llorente <ellorent@redhat.com>
  • Loading branch information
qinqon committed Jul 12, 2022
1 parent 7f0db5e commit 70c9359
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
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 build push

0 comments on commit 70c9359

Please sign in to comment.