Skip to content

Commit

Permalink
chore(ci): init mage build & test pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
heronimus committed Aug 14, 2023
1 parent 5c9ca2d commit 4dea358
Showing 1 changed file with 77 additions and 0 deletions.
77 changes: 77 additions & 0 deletions .github/workflows/mage-pipeline.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: template-mage-pipeline

## workflow will trigger on below condition,
## except image release that have jobs condition to trigger only on tagging
on:
pull_request:
branches:
- main
push:
branches:
- main
tags:
- 'v*.*.*'


env:
GCP_REGISTRY_ARTIFACT_PATH: us-docker.pkg.dev/world-engine-test/dark-forest
GCP_PROJECT_ID: world-engine-test
CARDINAL_REGISTRY_PATH: dark-forest/cardinal
NAKAMA_REGISTRY_PATH: dark-forest/nakama

jobs:
mage-build:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
strategy:
matrix:
go-version: [1.20.x]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Mage - check
uses: magefile/mage-action@v2
with:
version: latest
args: check
- name: Mage - build
uses: magefile/mage-action@v2
with:
version: latest
args: build
mage-test:
runs-on: ubuntu-latest
needs: mage-build
defaults:
run:
shell: bash
strategy:
matrix:
go-version: [1.20.x]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Mage - check
uses: magefile/mage-action@v2
with:
version: latest
args: check
- name: Mage - test
uses: magefile/mage-action@v2
with:
version: latest
args: test

0 comments on commit 4dea358

Please sign in to comment.