Skip to content

Commit

Permalink
ci: Fix job ignored when squased from PR branch
Browse files Browse the repository at this point in the history
  • Loading branch information
snorremd committed Oct 8, 2023
1 parent b7b6208 commit bb34fac
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 20 deletions.
19 changes: 4 additions & 15 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,8 @@ jobs:
uses: actions/setup-go@v4
with:
go-version: "1.21.1"
-
name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
args: release --clean --snapshot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
name: Check that go build works
run: |
go build -o norsky
11 changes: 6 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
tags:
- v*
branches-ignore:
- '**'

permissions:
contents: write
Expand All @@ -12,7 +14,6 @@ permissions:
jobs:
goreleaser:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
-
name: Checkout
Expand All @@ -24,12 +25,12 @@ jobs:
uses: actions/setup-go@v4
with:
go-version: "1.21.1"

-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
-

name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
Expand All @@ -44,4 +45,4 @@ jobs:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit bb34fac

Please sign in to comment.