CHG make SendPacketsWhenPossible LongRunning #25
Workflow file for this run
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: Pipeline | |
on: [push] | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET Core SDK 7 | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 7.0.x | |
- name: Download katai struct compiler | |
run: | | |
wget https://github.com/kaitai-io/kaitai_struct_compiler/releases/download/0.9/kaitai-struct-compiler-0.9.zip | |
unzip kaitai-struct-compiler-0.9.zip | |
PATH="${PWD}/kaitai-struct-compiler-0.9/bin/:${PATH}" | |
sudo apt-get update && sudo apt-get install -y openjdk-8-jre | |
cd Executables/Game | |
sudo chmod +x generate_kaitai.sh | |
./generate_kaitai.sh | |
- name: Install dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --configuration Release --no-restore | |
- name: Test | |
run: dotnet test --no-restore --verbosity normal | |
deploy: | |
needs: | |
- test | |
runs-on: ubuntu-latest | |
# only deploy if on master or tag | |
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Login to Docker Registry | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
registry: ${{ env.REGISTRY }} | |
# game | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta-game | |
uses: docker/[email protected] | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/game | |
tags: | | |
type=schedule | |
type=ref,event=branch | |
type=ref,event=tag | |
type=raw,latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }} | |
- name: Build and push game image | |
uses: docker/[email protected] | |
with: | |
context: . | |
file: Executables/Game/Dockerfile | |
push: true | |
tags: ${{ steps.meta-game.outputs.tags }} | |
labels: ${{ steps.meta-game.outputs.labels }} | |
# auth | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta-auth | |
uses: docker/[email protected] | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/auth | |
tags: | | |
type=schedule | |
type=ref,event=branch | |
type=ref,event=tag | |
type=raw,latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }} | |
- name: Build and push auth image | |
uses: docker/[email protected] | |
with: | |
context: . | |
images: ghcr.io/meikellp/quantum-core-x/auth | |
file: Executables/Auth/Dockerfile | |
push: true | |
tags: ${{ steps.meta-auth.outputs.tags }} | |
labels: ${{ steps.meta-auth.outputs.labels }} | |
# migrator | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta-migrator | |
uses: docker/[email protected] | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/migrator | |
tags: | | |
type=schedule | |
type=ref,event=branch | |
type=ref,event=tag | |
type=raw,latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }} | |
- name: Build and push migrator image | |
uses: docker/[email protected] | |
with: | |
context: . | |
images: ghcr.io/meikellp/quantum-core-x/migrator | |
file: Executables/Migrator/Dockerfile | |
push: true | |
tags: ${{ steps.meta-migrator.outputs.tags }} | |
labels: ${{ steps.meta-migrator.outputs.labels }} |