Skip to content

release v0.3.2 (#45) #40

release v0.3.2 (#45)

release v0.3.2 (#45) #40

Workflow file for this run

name: CI
on:
push:
branches:
- master
jobs:
build:
name: Build
runs-on: ubuntu-latest
env:
VERBOSE: 1
GOFLAGS: -mod=readonly
steps:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.20"
- name: Checkout code
uses: actions/checkout@v3
- name: Build
run: make build
test:
name: Test
runs-on: ubuntu-latest
env:
VERBOSE: 1
GOFLAGS: -mod=readonly
steps:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.20"
- name: Checkout code
uses: actions/checkout@v3
- name: Test
run: make test
docker:
name: Docker
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
if: github.event_name == 'push'
- name: Setup tag
run: |
echo "repo_downcase=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}
branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}
echo "image_tag=${branch}-${GITHUB_SHA:0:7}" >>${GITHUB_ENV}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/${{ env.repo_downcase }}:${{ env.image_tag }}
if: github.event_name == 'push'