update go versions/modules #113
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 Workflow | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout certsquirt | |
uses: actions/checkout@v4 | |
with: | |
path: certsquirt | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 'stable' | |
- name: Build CertSquirt | |
run: cd certsquirt && go build -v | |
- name: Install aws-sdk-cpp | |
id: vcpkg | |
uses: johnwason/vcpkg-action@v6 | |
with: | |
pkgs: aws-sdk-cpp[kms] aws-sdk-cpp[acm-pca] | |
triplet: x64-linux-dynamic | |
token: ${{ github.token }} | |
- name: Checkout aws-kms-pkcs11 | |
uses: actions/checkout@v4 | |
with: | |
repository: "JackOfMostTrades/aws-kms-pkcs11" | |
path: aws-kms-pkcs11 | |
- name: Install build dependencies | |
uses: ConorMacBride/install-package@v1 | |
with: | |
apt: build-essential libjson-c-dev libp11-kit-dev libcurl4 libcurl4-openssl-dev | |
- name: Build aws-kms-pkcs11 | |
run: cd aws-kms-pkcs11 && AWS_SDK_PATH=${{ github.workspace }}/vcpkg/installed/x64-linux-dynamic make | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: log in to the container registry | |
uses: docker/login-action@v2.1.0 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: extract metadata (tags, labels) for docker | |
id: meta | |
uses: docker/metadata-action@v4.3.0 | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
- name: Build the Docker image | |
uses: docker/build-push-action@v4.0.0 | |
with: | |
context: . | |
platforms: linux/amd64 | |
push: true | |
file: certsquirt/Dockerfile | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} |