-
Notifications
You must be signed in to change notification settings - Fork 5
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 #840 from TheEadie/new-actions
Update build and release pipelines for Worms Hub
- Loading branch information
Showing
4 changed files
with
160 additions
and
45 deletions.
There are no files selected for viewing
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,11 @@ | ||
name: Hub - Branches | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- "main" | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
uses: ./.github/workflows/hub-build.yml |
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
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,16 @@ | ||
name: Hub - Main | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
uses: ./.github/workflows/hub-build.yml | ||
|
||
release: | ||
name: Release | ||
needs: build | ||
uses: ./.github/workflows/hub-release.yml |
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,128 @@ | ||
name: Hub - Release | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
|
||
changes: | ||
name: Detect Changes | ||
runs-on: ubuntu-latest | ||
outputs: | ||
gateway: ${{ steps.filter.outputs.gateway || steps.filter.outputs.common }} | ||
replay-processor: ${{ steps.filter.outputs.replay-processor || steps.filter.outputs.common }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Filter | ||
uses: dorny/paths-filter@v3 | ||
id: filter | ||
with: | ||
filters: | | ||
gateway: | ||
- 'src/Worms.Hub.Gateway/**' | ||
- 'src/Worms.Hub.Storage/**' | ||
replay-processor: | ||
- 'src/Worms.Hub.ReplayProcessor/**' | ||
- 'src/Worms.Hub.Storage/**' | ||
- 'src/Worms.Armageddon.Game/**' | ||
common: | ||
- 'src/Directory.Build.props' | ||
- '.github/workflows/hub-*.yml' | ||
- 'build/docker/**' | ||
release-gateway-github: | ||
name: Gateway - GitHub | ||
runs-on: ubuntu-latest | ||
needs: changes | ||
if: ${{ needs.changes.outputs.gateway == 'true' && github.ref == 'refs/heads/main' }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Release | ||
run: | | ||
make gateway.release.github GITHUB_AUTH_TOKEN=${{ secrets.GITHUB_TOKEN }} | ||
release-gateway-dockerhub: | ||
name: Gateway - DockerHub | ||
runs-on: ubuntu-latest | ||
needs: changes | ||
if: ${{ needs.changes.outputs.gateway == 'true' && github.ref == 'refs/heads/main' }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Expose GitHub Runtime | ||
uses: crazy-max/ghaction-github-runtime@v3 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: theeadie | ||
password: ${{ secrets.DockerHubAccessToken }} | ||
|
||
- name: Release | ||
run: | | ||
make gateway.release.dockerhub | ||
release-replay-processor-github: | ||
name: Replay Processor - GitHub | ||
runs-on: ubuntu-latest | ||
needs: changes | ||
if: ${{ needs.changes.outputs.replay-processor == 'true' && github.ref == 'refs/heads/main' }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Release | ||
run: | | ||
make replay-processor.release.github GITHUB_AUTH_TOKEN=${{ secrets.GITHUB_TOKEN }} | ||
release-replay-processor-dockerhub: | ||
name: Replay Processor - DockerHub | ||
runs-on: ubuntu-latest | ||
needs: changes | ||
if: ${{ needs.changes.outputs.replay-processor == 'true' && github.ref == 'refs/heads/main' }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Expose GitHub Runtime | ||
uses: crazy-max/ghaction-github-runtime@v3 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: theeadie | ||
password: ${{ secrets.DockerHubAccessToken }} | ||
|
||
- name: Release | ||
run: | | ||
make replay-processor.release.dockerhub |