From c248a37c0c88e9184fd37291870ef0fa6df695e9 Mon Sep 17 00:00:00 2001 From: Julien Bouquillon Date: Mon, 18 Dec 2023 09:38:41 +0100 Subject: [PATCH] chore: workflows (#15) --- .github/workflows/production.yaml | 16 ---------------- .github/workflows/release.yaml | 17 +++++++++++++++++ .kontinuous/env/prod/values.yaml | 8 ++++++++ 3 files changed, 25 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/production.yaml b/.github/workflows/production.yaml index e5c330b..fc57d4c 100644 --- a/.github/workflows/production.yaml +++ b/.github/workflows/production.yaml @@ -10,23 +10,7 @@ concurrency: group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.ref }} jobs: - build-api: - name: Build API - runs-on: ubuntu-latest - steps: - - name: Use autodevops build and register - uses: socialgouv/workflows/actions/build-image@v1 - with: - imagePackage: api - token: ${{ secrets.GITHUB_TOKEN }} - environment: prod - dockerfile: ./api/Dockerfile - dockercontext: ./api - dockerbuildargs: | - PRODUCTION=true - kontinuous: name: "Deploy on Kubernetes 🐳" - needs: [build-api] uses: socialgouv/workflows/.github/workflows/use-ks-gh-production.yaml@v1 secrets: inherit diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..e229180 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,17 @@ +name: Release + +on: + workflow_dispatch: + push: + branches: [master, alpha, beta, next] + +jobs: + release: + name: Release + runs-on: ubuntu-latest + steps: + - uses: socialgouv/workflows/actions/semantic-release@v1 + with: + github-token: ${{ secrets.SOCIALGROOVYBOT_BOTO_PAT }} + author-name: ${{ secrets.SOCIALGROOVYBOT_NAME }} + author-email: ${{ secrets.SOCIALGROOVYBOT_EMAIL }} diff --git a/.kontinuous/env/prod/values.yaml b/.kontinuous/env/prod/values.yaml index b261e22..eed5aee 100644 --- a/.kontinuous/env/prod/values.yaml +++ b/.kontinuous/env/prod/values.yaml @@ -2,3 +2,11 @@ api: envFrom: - secretRef: name: api + +jobs: + runs: + build-api: + use: build + with: + buildArgs: + PRODUCTION="true"