Skip to content

Build and upload CSI driver container image #8

Build and upload CSI driver container image

Build and upload CSI driver container image #8

name: Build and upload CSI driver container image
on:
workflow_dispatch:
inputs:
versionTag:
description: "Version tag of the image"
default: "latest"
type: string
required: true
push:
branches:
- main
jobs:
build-csi-driver:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: "1.21.1"
- name: Set up Docker Buildx
id: docker-setup
uses: docker/setup-buildx-action@v2
- name: Build container image
run: GCE_PD_CSI_STAGING_IMAGE=ghcr.io/edgelesssys/constellation/gcp-csi-driver GCE_PD_CSI_STAGING_VERSION=${{ inputs.versionTag }} make build-container
- name: Log in to the Container registry
id: docker-login
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push container image
run: docker push ghcr.io/edgelesssys/constellation/gcp-csi-driver:${{ inputs.versionTag }}