Skip to content

Commit

Permalink
fix(generate.yml): add condition to deploy infrastructure and generat…
Browse files Browse the repository at this point in the history
…e action jobs to only run on the main branch
  • Loading branch information
jandroav committed Jan 5, 2024
1 parent 9c5f039 commit b874569
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ jobs:
run: spacectl stack local-preview --id liquibase-github-actions --disregard-gitignore=true

- name: Deploy infrastructure
if: github.ref == 'refs/heads/main'
env:
SPACELIFT_API_KEY_ENDPOINT: ${{ secrets.SPACELIFT_API_KEY_ENDPOINT }}
SPACELIFT_API_KEY_ID: ${{ secrets.SPACELIFT_API_KEY_ID }}
Expand All @@ -74,6 +75,7 @@ jobs:
generate-action:
runs-on: ubuntu-latest
needs: [ create-command-list, create-action-repo ]
if: github.ref == 'refs/heads/main'
strategy:
matrix:
commands: ${{ fromJSON(needs.create-command-list.outputs.matrix) }}
Expand Down

0 comments on commit b874569

Please sign in to comment.