Docker arm64 #69
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
on: [push, pull_request] | |
name: Test | |
jobs: | |
test: | |
strategy: | |
matrix: | |
platform: [ubuntu-latest, macos-latest] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: './go.mod' | |
- name: Test | |
run: go test ./... | |
coverage: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: './go.mod' | |
- name: Calculate coverage | |
run: go test -covermode=count -coverprofile=coverage.out ./... | |
- name: Convert coverage to lcov | |
uses: jandelgado/gcov2lcov-action@v1.0.0 | |
with: | |
infile: coverage.out | |
outfile: coverage.lcov | |
- name: Coveralls | |
uses: coverallsapp/github-action@v1.0.1 | |
with: | |
github-token: ${{ secrets.github_token }} | |
path-to-lcov: coverage.lcov | |
docker: | |
name: Docker Build | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/docker-') | |
needs: test | |
permissions: | |
id-token: write | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Set output | |
id: vars | |
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} | |
- name: Docker publish | |
uses: daspawnw/docker-multi-build-push-action@master | |
with: | |
platforms: "linux/amd64,linux/arm64" | |
docker-tag: "${{ steps.vars.outputs.tag }}" | |
ghcr-enabled: "true" | |
ghcr-token: "${{ secrets.GITHUB_TOKEN }}" | |
ecr-enabled: ${{ github.repository == 'daspawnw/vault-crd' }} | |
ecr-role-to-assume: "${{ secrets.AWS_PUBLIC_ECR_ARN }}" | |
ecr-repository-url: "public.ecr.aws/l2l6k4u5/prometheus-aws-discovery" |