Build and upload CSI driver container image #7
Workflow file for this run
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: 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 }} |