Skip to content

driver(kmsp11): v1.6 #1

driver(kmsp11): v1.6

driver(kmsp11): v1.6 #1

Workflow file for this run

on:
push: {}
jobs:
push_to_registry:
name: Push Docker image to gchr.io
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Set Environment Variables
run: |
echo "runner_arch=$(uname -m)" | tee -a $GITHUB_ENV
echo "driver_name=$(perl -n -e '/refs\/tags\/([^-]+)-v(.+)/ && print $1')" | tee -a $GITHUB_ENV
echo "driver_version=$(perl -n -e '/refs\/tags\/([^-]+)-v(.+)/ && print $2')" | tee -a $GITHUB_ENV
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
if: startsWith(github.ref, 'refs/tags/')
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
- name: Docker meta
id: docker_meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{ github.repository_owner }}/hsm-drivers
- name: build and push
uses: docker/build-push-action@v4
with:
context: .
file: ${{ env.driver_name }}.Dockerfile
cache-from: type=gha
cache-to: type=gha
push: ${{ startsWith(github.ref, 'refs/tags/') }}
labels: ${{ steps.docker_meta.outputs.labels }}
tags: ${{ steps.docker_meta.outputs.tags }}