feat(logger): change log.TimestampKey
to ts
#37
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
name: Release & Publish | |
on: | |
push: | |
tags: ["v*.*.**"] | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: "Target tag to release/publish" | |
required: true | |
type: string | |
job: | |
description: "Choose job to run" | |
required: true | |
default: 'both' | |
type: choice | |
options: | |
- both | |
- release | |
- publish | |
jobs: | |
release: | |
name: goreleaser-cross | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/goreleaser/goreleaser-cross:latest | |
if: ${{ github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && (inputs.job == 'release' || inputs.job == 'both')) }} | |
steps: | |
- uses: actions/checkout@master | |
with: | |
ref: "${{ inputs.tag || github.ref_name }}" | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: 'stable' | |
- run: git config --global --add safe.directory "$(pwd)" | |
- run: goreleaser release | |
env: | |
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
publish: | |
name: publish images | |
runs-on: ubuntu-latest | |
if: ${{ github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && (inputs.job == 'publish' || inputs.job == 'both')) }} | |
steps: | |
- uses: actions/checkout@master | |
with: | |
ref: "${{ inputs.tag || github.ref_name }}" | |
- uses: docker/[email protected] | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- uses: docker/[email protected] | |
with: | |
push: true | |
build-args: "VERSION=${{ inputs.tag || github.ref_name }}" | |
tags: "ghcr.io/${{ github.repository }}:latest,ghcr.io/${{ github.repository }}:${{ inputs.tag || github.ref_name }}" |