-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #91 from oblivioncth/reusable_workflows
Switch to reusable workflows
- Loading branch information
Showing
11 changed files
with
136 additions
and
347 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Build Project | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches-ignore: | ||
- 'master' | ||
workflow_run: | ||
workflows: Tag and Sync | ||
types: completed | ||
branches: dev | ||
# This is the branch that the original workflow ran on, which is technically dev, due to how | ||
# the "pull_request" trigger works (it works off master correctly for a merged PR but is triggered | ||
# by dev | ||
|
||
jobs: | ||
trigger-build: | ||
name: Build Project | ||
if: github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' | ||
uses: oblivioncth/actions/.github/workflows/build-cxx-project.yml@v1 | ||
secrets: | ||
ffynnon_access: ${{ secrets.OBYBOT_FFYNNON_ACCESS }} | ||
with: | ||
runs_exclude: > | ||
[ | ||
{ "compiler": "g++-10" } | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name: Check Release PR | ||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
branches: master | ||
|
||
jobs: | ||
check-pr-correctness: | ||
name: Release PR Correctness Check | ||
uses: oblivioncth/actions/.github/workflows/validate-release-pr.yml@v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: Generate Release | ||
on: | ||
workflow_run: | ||
workflows: Build Project | ||
types: completed | ||
branches: master | ||
|
||
jobs: | ||
create-release-suffix: | ||
name: Create Release Name Suffix | ||
if: github.event.workflow_run.conclusion == 'success' | ||
runs-on: ubuntu-latest | ||
outputs: | ||
suffix: ${{ steps.form_suffix.outputs.suffix }} | ||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v4 | ||
- name: Get target FP version | ||
id: check_target_fp | ||
env: | ||
match_start: set\(TARGET_FP_VERSION_PREFIX | ||
match_end: \) | ||
shell: pwsh | ||
run: | | ||
$project_lists = Get-Content -Raw CMakeLists.txt | ||
if(!($project_lists -match '(?<=${{ env.match_start }})(.*)(?=${{ env.match_end }})')){ | ||
throw "Could not get target FP version!" | ||
} | ||
$target_version = "v$($Matches[1].Trim())" | ||
echo "fp_version=$target_version" >> $Env:GITHUB_ENV | ||
- name: Form suffix | ||
id: form_suffix | ||
run: | | ||
suffix="(Targets FP $fp_version)" | ||
echo "suffix=$suffix" >> $GITHUB_OUTPUT | ||
update-redirect: | ||
name: Update redirect page | ||
permissions: | ||
actions: read | ||
contents: read | ||
pages: write | ||
id-token: write | ||
if: github.event.workflow_run.conclusion == 'success' | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.page-deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
- name: Setup pages | ||
uses: actions/configure-pages@v4 | ||
- name: Upload pages artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: ${{ github.workspace }}/redirector | ||
- name: Deploy pages artifact | ||
id: page-deployment | ||
uses: actions/deploy-pages@v4 | ||
|
||
generate-release: | ||
name: Generate Release | ||
needs: create-release-suffix | ||
permissions: | ||
actions: read | ||
contents: write | ||
pages: write | ||
id-token: write | ||
if: github.event.workflow_run.conclusion == 'success' | ||
uses: oblivioncth/actions/.github/workflows/generate-cxx-release.yml@v1 | ||
with: | ||
artifacts_run_id: ${{ github.event.workflow_run.id }} | ||
name_suffix: ${{ needs.create-release-suffix.outputs.suffix }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: Label PR | ||
on: | ||
pull_request_target: | ||
types: [opened, synchronize, reopened] | ||
|
||
jobs: | ||
label-pr: | ||
name: Label pull-request | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
uses: oblivioncth/actions/.github/workflows/label-pr.yml@v1 |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.