return an error instead of attempting to auth without the right info #32
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: Build | |
on: [push] | |
jobs: | |
linting: | |
name: Linting | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v5 | |
with: | |
version: latest | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.20" | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Test | |
run: go test ./... | |
deploy: | |
name: Deploy | |
runs-on: ubuntu-latest | |
needs: [linting, test] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
ALIGN_CLIENT_ID: ${{ secrets.ALIGN_CLIENT_ID }} | |
ALIGN_CLIENT_SECRET: ${{ secrets.ALIGN_CLIENT_SECRET }} | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.20" | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Login to Docker Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Snapshot | |
uses: goreleaser/goreleaser-action@v2 | |
with: | |
args: release --snapshot | |
- name: Release | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: goreleaser/goreleaser-action@v2 | |
with: | |
args: release --rm-dist |