Skip to content

Commit

Permalink
Change when workflows run
Browse files Browse the repository at this point in the history
  • Loading branch information
DistroByte committed Jan 29, 2024
1 parent 3ea3828 commit 7ff48b5
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: [self-hosted, deployment-runner]
container:
image: git.dbyte.xyz/distro/levant
if: github.ref != 'refs/heads/master' && github.event_name == 'workflow_dispatch'
if: github.ref != 'refs/heads/main' && github.event_name != 'workflow_dispatch'
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
Expand All @@ -37,21 +37,20 @@ jobs:
runs-on: [self-hosted, deployment-runner]
container:
image: multani/nomad
if: github.event_name == 'workflow_dispatch'
if: github.ref != 'refs/heads/main' && github.event_name == 'workflow_dispatch'
timeout-minutes: 60
steps:
- run: echo "null"
- run: nomad status -address=http://nomad.service.consul:4646
- run: nomad job stop -address=http://nomad.service.consul:4646 -purge blockbot-${GITHUB_SHA}
- run: nomad job stop -address=http://nomad.service.consul:4646 -purge blockbot-${GITHUB_REF_NAME}

deploy_prod:
needs:
- deploy_review
- stop_review
- build
runs-on: [self-hosted, deployment-runner]
container:
image: git.dbyte.xyz/distro/levant
if: github.ref == 'refs/heads/master'
if: github.ref == 'refs/heads/main' && github.event_name == 'workflow_dispatch'
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
Expand Down

0 comments on commit 7ff48b5

Please sign in to comment.