Skip to content

feat(controller): support for data at rest encryption (#102) #37

feat(controller): support for data at rest encryption (#102)

feat(controller): support for data at rest encryption (#102) #37

Workflow file for this run

name: build
on:
push:
branches: ["main", "alpha", "beta"]
tags: ["v*"]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
PKG: github.com/UpCloudLtd/upcloud-csi/cmd/upcloud-csi-plugin
NAME: upcloud-csi-plugin
GOOS: linux
GOARCH: amd64
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.GH_USER }}
password: ${{ secrets.GH_PAT }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Set go environment
uses: actions/setup-go@v4
with:
go-version: '1.20'
- name: Build Go binary
run: GOOS=${{ env.GOOS }} GOARCH=${{ env.GOARCH }} CGO_ENABLED=0 go build -ldflags "-w -s" -o cmd/upcloud-csi-plugin/${{ env.NAME }} ${{ env.PKG }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
file: cmd/upcloud-csi-plugin/Dockerfile
context: cmd/upcloud-csi-plugin/
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64