Skip to content

Merge pull request #71 from oshoval/main_CVE-2023-45288_2a1c6a3f #59

Merge pull request #71 from oshoval/main_CVE-2023-45288_2a1c6a3f

Merge pull request #71 from oshoval/main_CVE-2023-45288_2a1c6a3f #59

Workflow file for this run

name: Push container image
on:
push:
branches:
- main
tags:
- 'v*.*.*'
env:
image-push-owner: 'kubevirt'
jobs:
push-amd64:
name: Image push/amd64
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Container Registry
if: github.repository_owner == 'kubevirt'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Version metadata
run: |
echo "git_commit_hash=$(git describe --no-match --always --abbrev=40 --dirty)" >> $GITHUB_ENV
- name: Set lower case repository name
run: |
echo "REPOSITORY_LC=${REPOSITORY,,}" >>${GITHUB_ENV}
env:
REPOSITORY: '${{ github.repository }}'
- name: Push latest container image
if: github.repository_owner == 'kubevirt'
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ghcr.io/${{ env.REPOSITORY_LC }}:latest
file: Dockerfile
build-args: |
git_sha=${{ env.git_commit_hash }}
- name: Push tagged container image
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ghcr.io/${{ env.REPOSITORY_LC }}:${{ github.ref_name }}
file: Dockerfile
build-args: |
git_sha=${{ env.git_commit_hash }}
- name: Update release manifests
if: startsWith(github.ref, 'refs/tags/')
run: IMAGE=ghcr.io/${{ env.REPOSITORY_LC }}:${{ github.ref_name }} hack/update-manifest.sh
- name: Release the kraken
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
generate_release_notes: true
files: |
manifests/secondarydns.yaml