Skip to content

v1.11.1

v1.11.1 #40

Workflow file for this run

name: Release
on:
release:
types: [ published ]
env:
REGISTRY: ghcr.io
ACR_REGISTRY: registry.cn-shenzhen.aliyuncs.com
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ~1.21
- name: Build Server
run: go build
env:
CGO_ENABLED: 0
GO111MODULE: on
GOARCH: amd64
GOOS: linux
- name: Login GitHub
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login ACR
uses: docker/login-action@v3
with:
registry: ${{ env.ACR_REGISTRY }}
username: ${{ secrets.ACR_USERNAME }}
password: ${{ secrets.ACR_PASSWORD }}
- name: Get Metadata
id: meta
uses: docker/metadata-action@v4
with:
images: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
${{ env.ACR_REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Push Images
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}