Move Announcers up one level in the Gateway #282
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
name: Hub | |
on: | |
push: | |
paths: | |
- "src/Directory.Build.props" | |
- "src/Worms.Hub*/**" | |
- "src/database/**" | |
- "build/docker/**" | |
- "build/release-github.sh" | |
- "build/version.sh" | |
- ".github/workflows/hub.yml" | |
jobs: | |
build-gateway: | |
name: Package - Gateway | |
runs-on: ubuntu-latest | |
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: Package | |
run: | | |
make gateway.package | |
build-replay-processor: | |
name: Package - Replay Processor | |
runs-on: ubuntu-latest | |
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: Package | |
run: | | |
make replay-processor.package | |
build-database: | |
name: Build - Database | |
runs-on: ubuntu-latest | |
env: | |
FLYWAY_EMAIL: ${{ secrets.FLYWAY_EMAIL }} | |
FLYWAY_TOKEN: ${{ secrets.FLYWAY_TOKEN }} | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_USER: worms | |
POSTGRES_PASSWORD: worms | |
POSTGRES_DB: worms | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5432:5432 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Test Flyway Migrations | |
uses: docker://redgate/flyway:10 | |
with: | |
args: >- | |
-workingDirectory=/github/workspace/src/database | |
-environment=build | |
info | |
migrate | |
info | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
needs: [build-gateway, build-replay-processor, build-database] | |
if: 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 GITHUB_AUTH_TOKEN=${{ secrets.GITHUB_TOKEN }} | |
make replay-processor.release GITHUB_AUTH_TOKEN=${{ secrets.GITHUB_TOKEN }} |