Skip to content

Bump go 1.20 => 1.21 #45

Bump go 1.20 => 1.21

Bump go 1.20 => 1.21 #45

Workflow file for this run

name: ci
on: [push]
jobs:
hadolint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: hadolint/[email protected]
with:
ignore: DL3018
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version-file: go.mod
- name: Lint & Test
run: make setup-ci ci
docker:
if: ${{ github.ref != 'refs/heads/main' }}
needs: [hadolint, test]
runs-on: ubuntu-latest
env:
REGISTRY: ghcr.io
steps:
- uses: actions/checkout@v3
- name: Expose git context
id: git
run: |
echo "sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
echo "ref=${GITHUB_REF##*/}" >> $GITHUB_OUTPUT
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@v4
if: ${{ startsWith(github.ref, 'refs/tags/v') != true }}
with:
platforms: linux/amd64,linux/arm64
tags: |
${{ env.REGISTRY }}/${{ github.repository }}:${{steps.git.outputs.sha}}
${{ env.REGISTRY }}/${{ github.repository }}:${{steps.git.outputs.ref}}
build-args: |
GITHUB_SHA=${{ steps.git.outputs.sha }}
GITHUB_REF=${{ steps.git.outputs.ref }}
push: true
- uses: docker/build-push-action@v4
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
with:
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
tags: |
${{ env.REGISTRY }}/${{ github.repository }}:${{steps.git.outputs.sha}}
${{ env.REGISTRY }}/${{ github.repository }}:${{steps.git.outputs.ref}}
${{ env.REGISTRY }}/${{ github.repository }}:latest
build-args: |
GITHUB_SHA=${{ steps.git.outputs.sha }}
GITHUB_REF=${{ steps.git.outputs.ref }}
push: true