Skip to content

chore(deps): update golang:1.23 docker digest to 3694e36 #343

chore(deps): update golang:1.23 docker digest to 3694e36

chore(deps): update golang:1.23 docker digest to 3694e36 #343

Workflow file for this run

---
name: CI
on:
pull_request:
branches:
- main
push:
branches:
- main
permissions:
contents: read
packages: write
env:
# renovate: datasource=github-releases depName=golangci/golangci-lint versioning=semver-coerced
GOLANGCI_LINT_VERSION: "v1.62.0"
IMAGE_NAME: "${{ github.repository }}"
TAG: "ghcr.io/${{ github.repository }}:latest"
TEST_PARAMS: "--vault-addr localhost:1234 --initout file:/secret_out.txt --dry-run"
REGISTRY: "ghcr.io"
jobs:
go:
name: Go
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Set up Go
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5
with:
go-version-file: 'go.mod'
- name: golangci-lint
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6
with:
version: ${{ env.GOLANGCI_LINT_VERSION }}
args: --timeout=10m
- name: go test
run: |
go test -v ./...
- name: run vault-init
run: |
go build -o vault-init .
./vault-init ${{ env.TEST_PARAMS }}
docker:
name: Docker Build vault-init
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3
- name: Log in to the Container registry
if: ${{ github.ref == 'refs/heads/main' }}
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build test image
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6
with:
context: .
push: false
load: true
tags: ${{ env.TAG }}
cache-from: type=gha
- name: Test image
run: |
docker run --rm ${{ env.TAG }} ${{ env.TEST_PARAMS }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=pr
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
- name: Build images
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.ref == 'refs/heads/main' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max