aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMohammed Al Sahaf <[email protected]>2024-11-05 20:56:13 +0000
committerMohammed Al Sahaf <[email protected]>2024-11-05 20:56:13 +0000
commitd625d2ac425f9ba23b985d04bad9809f348facfb (patch)
treefc21653372f88d5fd125f1b254480b216bb3d0e1
parent514d3999bca2aca713ebde8435b0abc53c9b99ac (diff)
downloadcaddy-improve-goreleaser-check.tar.gz
caddy-improve-goreleaser-check.zip
run only on non-fork or caddyserver repo, and use branch nameimprove-goreleaser-check
Signed-off-by: Mohammed Al Sahaf <[email protected]>
-rw-r--r--.github/workflows/ci.yml17
1 files changed, 2 insertions, 15 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 81a7af15f..049003233 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -194,24 +194,11 @@ jobs:
goreleaser-check:
runs-on: ubuntu-latest
+ if: github.repository_owner == 'caddyserver' && github.actor != 'dependabot[bot]'
steps:
- name: Checkout code
uses: actions/checkout@v4
- - name: Print Go version and environment
- id: vars
- shell: bash
- run: |
- printf "Using go at: $(which go)\n"
- printf "Go version: $(go version)\n"
- printf "\n\nGo environment:\n\n"
- go env
- printf "\n\nSystem environment:\n\n"
- env
- printf "Git version: $(git version)\n\n"
- # Calculate the short SHA1 hash of the git commit
- echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
-
- uses: goreleaser/goreleaser-action@v6
with:
version: latest
@@ -230,4 +217,4 @@ jobs:
version: latest
args: build --single-target --snapshot
env:
- TAG: "${{ steps.vars.outputs.short_sha }}"
+ TAG: ${{ github.head_ref || github.ref_name }}