Merge pull request #10 from nicholas-fedor/9-golangci-lint-version-error #12
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: Push to main | |
on: | |
workflow_dispatch: {} | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write | |
actions: read | |
packages: write | |
id-token: write | |
jobs: | |
lint: | |
uses: ./.github/workflows/lint.yaml | |
test: | |
uses: ./.github/workflows/test.yaml | |
build-and-publish: | |
needs: | |
- test | |
- lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2 | |
with: | |
fetch-depth: 0 | |
- name: Set up Go | |
uses: actions/setup-go@5a083d0e9a84784eb32078397cf5459adecb4c40 | |
with: | |
go-version: 1.24.0 | |
- name: Install templ | |
run: go install github.com/a-h/templ/cmd/templ@latest | |
- name: Generate templates | |
run: templ generate | |
- name: Login to Docker Hub | |
uses: docker/login-action@327cd5a69de6c009b9ce71bce8395f28e651bf99 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Login to GHCR | |
uses: docker/login-action@327cd5a69de6c009b9ce71bce8395f28e651bf99 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@90a3faa9d0182683851fbfa97ca1a2cb983bfca3 | |
with: | |
version: latest | |
args: release --rm-dist --snapshot | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} |