Merge pull request #67 from qinqon/udpn-print-errors #66
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: Push container image | |
on: | |
push: | |
branches: | |
- main | |
tags: [ 'v*.*.*' ] | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: kubevirt/ipam-controller | |
PASST_BINDING_CNI_IMAGE_NAME: kubevirt/passt-binding-cni | |
jobs: | |
push-amd64: | |
name: Image push/amd64 | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
packages: write | |
attestations: write | |
id-token: write | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
- name: Version Check | |
run: | | |
echo "git_commit_hash=$(git describe --no-match --always --abbrev=8 --dirty)" >> $GITHUB_ENV | |
- name: Set up Docker Buildx | |
uses: docker/[email protected] | |
- name: Login to Container Registry | |
if: github.repository_owner == 'kubevirt' | |
uses: docker/[email protected] | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Fetch KubeVirt Release | |
run: | | |
KUBEVIRT_VERSION=$(curl -sSL https://storage.googleapis.com/kubevirt-prow/release/kubevirt/kubevirt/stable.txt) | |
echo "KUBEVIRT_VERSION=${KUBEVIRT_VERSION}" >> $GITHUB_ENV | |
- name: Push latest container image | |
if: github.repository_owner == 'kubevirt' | |
uses: docker/[email protected] | |
with: | |
context: . | |
push: true | |
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest | |
file: Dockerfile | |
- name: Push latest passt binding cni container image | |
if: github.repository_owner == 'kubevirt' | |
uses: docker/[email protected] | |
with: | |
context: . | |
push: true | |
tags: ${{ env.REGISTRY }}/${{ env.PASST_BINDING_CNI_IMAGE_NAME }}:latest | |
file: passt/Dockerfile | |
build-args: | | |
KUBEVIRT_VERSION=${{ env.KUBEVIRT_VERSION }} | |
- name: Push stable container image | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: docker/[email protected] | |
with: | |
context: . | |
push: true | |
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }} | |
file: Dockerfile | |
- name: Push stable passt binding cni container image | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: docker/[email protected] | |
with: | |
context: . | |
push: true | |
tags: ${{ env.REGISTRY }}/${{ env.PASST_BINDING_CNI_IMAGE_NAME }}:${{ github.ref_name }} | |
file: passt/Dockerfile | |
build-args: | | |
KUBEVIRT_VERSION=${{ env.KUBEVIRT_VERSION }} | |
- name: Template release manifests | |
if: startsWith(github.ref, 'refs/tags/') | |
run: IMG=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }} make build-installer | |
- name: Release the kraken | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
generate_release_notes: true | |
files: | | |
dist/install.yaml |