Skip to content

Commit

Permalink
split workflows into multiple files change gcp server
Browse files Browse the repository at this point in the history
  • Loading branch information
f-gate committed Dec 5, 2023
1 parent b232698 commit f9cc318
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 11 deletions.
11 changes: 1 addition & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,9 @@ on:
- "**.md"
env:
CARGO_TERM_COLOR: always
GCP_ZONE: europe-west3-a
GCP_ZONE: europe-west3-b

jobs:
check_branch:
runs-on: ubuntu-latest
steps:
- name: Check branch
if: github.base_ref == 'main' && github.head_ref != 'staging'
run: |
echo "ERROR: You can only merge to main from staging."
exit 1
create-runner:
runs-on: ubuntu-latest
outputs:
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/check_branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

name: check-branch
on:
workflow_dispatch:
push:
branches:
- main
paths-ignore:
- "**.md"
pull_request:
branches:
- main
- staging
paths-ignore:
- "**.md"

jobs:
check_branch:
runs-on: ubuntu-latest
steps:
- name: Check branch
if: github.base_ref == 'main' && github.head_ref != 'staging'
run: |
echo "ERROR: You can only merge to main from staging."
exit 1
2 changes: 1 addition & 1 deletion .github/workflows/fmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:

jobs:
cargo-fmt:
runs-on: ${{ needs.create-runner.outputs.label }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

Expand Down

0 comments on commit f9cc318

Please sign in to comment.