Deploy #35
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: Deploy | |
on: | |
workflow_call: | |
inputs: | |
forRef: | |
required: true | |
type: string | |
workflow_dispatch: | |
inputs: | |
forRef: | |
description: 'Branch, SHA or Tag to release' | |
required: false | |
type: string | |
create: | |
permissions: | |
contents: write | |
packages: write | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
jobs: | |
deploy: | |
name: Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ inputs.forRef }} | |
- name: Unshallow | |
run: git fetch --prune --unshallow | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'go.mod' | |
check-latest: true | |
cache: true | |
- name: Login to github registry | |
uses: docker/login-action@v2.2.0 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v4.4.0 | |
with: | |
version: latest | |
args: release --rm-dist | |
env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# Need PAT to write into homebrew-tap repo | |
GITHUB_TOKEN: ${{ secrets.PAT }} |