Skip to content

Commit

Permalink
FEAT: tweaks to existing workflows
Browse files Browse the repository at this point in the history
Limit workflows to only run on the main POB repo and not forks (can be
modified by fork authors). Limit concurency on build diff to limit build
code provider bandwidth.
  • Loading branch information
Paliak committed Mar 25, 2024
1 parent 6d55153 commit 82248ec
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 28 deletions.
35 changes: 18 additions & 17 deletions .github/workflows/beta.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Push beta branch
on:
on:
schedule:
- cron: '0 0 * * 5'
push:
Expand All @@ -8,21 +8,22 @@ on:
workflow_dispatch:
jobs:
push-beta:
if: github.repository == 'PathOfBuildingCommunity/PathOfBuilding'
runs-on: ubuntu-22.04
steps:
- name: Set line endings
run: git config --global core.autocrlf true
- name: Checkout
uses: actions/checkout@v3
with:
ref: 'dev'
- name: Configure bot user
run: |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
- name: Update manifest.xml
run: python3 update_manifest.py --quiet --in-place
- name: Push to beta branch
run: |
git commit -am "Weekly beta release" --allow-empty --author="github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>"
git push origin HEAD:beta --force
- name: Set line endings
run: git config --global core.autocrlf true
- name: Checkout
uses: actions/checkout@v3
with:
ref: 'dev'
- name: Configure bot user
run: |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
- name: Update manifest.xml
run: python3 update_manifest.py --quiet --in-place
- name: Push to beta branch
run: |
git commit -am "Weekly beta release" --allow-empty --author="github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>"
git push origin HEAD:beta --force
17 changes: 6 additions & 11 deletions .github/workflows/test.yml → .github/workflows/buildtest.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
name: Run Tests
on:
workflow_dispatch:
push:
branches: [ dev ]
pull_request:
branches: [ dev ]
jobs:
run_unit_tests:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Run busted tests
run: docker compose run --no-TTY busted-tests

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
run_build_diff:
if: github.repository == 'PathOfBuildingCommunity/PathOfBuilding'
runs-on: ubuntu-latest
steps:
- name: Checkout HEAD
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Run Unit Tests
on:
workflow_dispatch:
push:
branches: [ dev ]
pull_request:
branches: [ dev ]

jobs:
run_unit_tests:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Run busted tests
run: docker compose run --no-TTY busted-tests

0 comments on commit 82248ec

Please sign in to comment.