Skip to content

cleanup

cleanup #5

Workflow file for this run

name: Go
on:
push:
branches: [ main ]
paths-ignore:
- 'README.md'
pull_request:
jobs:
build:
if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.21
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.55
- name: Set up QEMU
if: github.event_name == 'push'
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
if: github.event_name == 'push'
uses: docker/setup-buildx-action@v1
- name: Log into GitHub Container Registry
if: github.event_name == 'push'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
- name: Get branch name (merge)
if: github.event_name != 'pull_request'
shell: bash
run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV
- name: Push to Github Container Registry
if: github.event_name == 'push'
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64,linux/arm/v8
push: true
tags: ghcr.io/${{ github.repository }}:${{ env.BRANCH_NAME }}