From 1461c78cb347b6c80e37046df852854498a274fd Mon Sep 17 00:00:00 2001 From: GalvinGao Date: Tue, 11 Oct 2022 20:17:15 -0400 Subject: [PATCH] build: add workflows --- .github/workflows/build-check.yml | 25 ++++++++++++++++++ .github/workflows/build-release.yml | 39 +++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 .github/workflows/build-check.yml create mode 100644 .github/workflows/build-release.yml diff --git a/.github/workflows/build-check.yml b/.github/workflows/build-check.yml new file mode 100644 index 0000000..c1c3c59 --- /dev/null +++ b/.github/workflows/build-check.yml @@ -0,0 +1,25 @@ +name: Build Docker Image (Check) + +on: + # trigger on any pull requests + pull_request: + branches: + - "**" +concurrency: + group: ${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: "Checkout" + uses: actions/checkout@v3 + + - name: "Docker: Build and Push Image" + id: ghcr-docker + uses: 'penguin-statistics/actions/ghcr-docker@main' + with: + version: '__check__' + repository: 'penguin-statistics/gopkgserver' + push: false diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml new file mode 100644 index 0000000..551e662 --- /dev/null +++ b/.github/workflows/build-release.yml @@ -0,0 +1,39 @@ +name: Build Docker Image (Release) + +on: + push: + # trigger on version tag push + tags: + - "v*" + +concurrency: + group: ${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: "Checkout" + uses: actions/checkout@v3 + + - name: "Metadata: Git" + id: git-meta + uses: 'penguin-statistics/actions/git-meta@main' + + - name: "Docker: Build and Push Image" + id: ghcr-docker + uses: 'penguin-statistics/actions/ghcr-docker@main' + with: + version: ${{ steps.git-meta.outputs.version }} + repository: 'penguin-statistics/gopkgserver' + + - name: "Release: Call Dispatcher" + id: release-dispatcher + uses: 'penguin-statistics/actions/release-dispatcher@main' + with: + version: ${{ steps.git-meta.outputs.version }} + use-ghrelease: true + # use-manifestbot: true + # manifestbot-file-path: 'applications/gopkgserver/values-prod.yaml' + # manifestbot-token: ${{ secrets.PAT_FOR_MANIFESTBOT }}