Skip to content

Update .NET Core Docker containers #54

Update .NET Core Docker containers

Update .NET Core Docker containers #54

Workflow file for this run

name: Hub.Gateway
on:
push:
paths:
- "src/Worms.Hub.Gateway/**"
- "src/database/**"
- "build/docker/makefile"
- "build/docker/gateway/**"
- "build/release-github.sh"
- "build/version.sh"
- ".github/workflows/hub-gateway.yml"
jobs:
build:
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-database:
name: Build - Database
runs-on: ubuntu-latest
env:
FLYWAY_LICENSE_KEY: ${{ secrets.FLYWAY_LICENSE_KEY }}
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:9
with:
args: >-
-locations="filesystem:/github/workspace/src/database/migrations"
-configFiles="/github/workspace/src/database/flyway.conf"
-url="jdbc:postgresql://postgres:5432/worms"
-user="worms"
-password="worms"
-schemas="public"
info
migrate
info
release:
name: Release
runs-on: ubuntu-latest
needs: [build, build-database]
if: github.ref == 'refs/heads/master'
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 }}