Skip to content

Commit

Permalink
🤖 CI: Give up on env vars within CI build if conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelborn committed Feb 1, 2024
1 parent 32c9d9a commit f226974
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
uses: ./.github/workflows/tests.yml

format:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
if: "!contains(github.event.head_commit.message, '[ci skip]') && github.ref_name != 'main' && github.ref_name != 'master'"
uses: ./.github/workflows/format.yml

release:
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,9 @@ name: Format Java and CFML Source Code
on:
workflow_call:

env:
SNAPSHOT: ${{ github.ref_name != 'main' && github.ref_name != 'master' }}

jobs:
formatJava:
runs-on: ubuntu-latest
if: ${{ env.SNAPSHOT == 'true' }}
steps:
- uses: actions/checkout@v4

Expand All @@ -30,7 +26,6 @@ jobs:
formatCFML:
runs-on: ubuntu-latest
needs: [ formatJava ]
if: ${{ env.SNAPSHOT == 'true' }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
Expand Down

0 comments on commit f226974

Please sign in to comment.