Skip to content

Commit

Permalink
fix: Var default_branch is unreliable in some contexts
Browse files Browse the repository at this point in the history
  • Loading branch information
clemlesne committed Jan 12, 2024
1 parent f6e89f1 commit 4797ebc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ jobs:
uses: actions/[email protected]
with:
script: |
const isMain = context.ref == `refs/heads/${context.payload.repository.default_branch}`;
const isMain = context.ref == `refs/heads/main`;
const repoName = context.repo.repo;
console.log(isMain ? 'Creating release for default branch' : 'Creating release for non-default branch');
Expand All @@ -205,7 +205,7 @@ jobs:
- create-release
- init
# Only publish on non-scheduled default branch
if: (github.event_name != 'schedule') && (github.ref == 'refs/heads/${context.payload.repository.default_branch}')
if: (github.event_name != 'schedule') && (github.ref == 'refs/heads/main')
steps:
- name: publish release
id: publish-release
Expand Down

0 comments on commit 4797ebc

Please sign in to comment.