Skip to content

Commit

Permalink
chore: enable deployment in prod & fix release-please configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
raphael0202 committed Feb 16, 2024
1 parent 28aed8d commit 0a85f3a
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 17 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/container-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ on:
branches:
- main
- deploy-*
# only staging for now, not prod
# tags:
# - v*.*.*
tags:
- v*.*.*


# Note on secrets used for connection
Expand All @@ -23,9 +22,7 @@ jobs:
strategy:
matrix:
env:
# only stagging for now
# Note: env is also the name of the directory on the server
- nutripatrol-net
- ${{ startsWith(github.ref, 'refs/tags/v') && 'robotoff-org' || 'robotoff-net' }}
environment: ${{ matrix.env }}
concurrency: ${{ matrix.env }}
steps:
Expand Down Expand Up @@ -193,4 +190,4 @@ jobs:
apiHost: https://grafana.openfoodfacts.org
apiToken: ${{ secrets.GRAFANA_API_TOKEN }}
text: <a href="https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}">Deployment ${{ steps.livecheck.outcome }} on ${{ matrix.env }}</a>
tags: type:deployment,origin:github,status:${{ steps.livecheck.outcome }},repo:${{ github.repository }},sha:${{ github.sha }},app:robotoff,env:${{ matrix.env }}
tags: type:deployment,origin:github,status:${{ steps.livecheck.outcome }},repo:${{ github.repository }},sha:${{ github.sha }},app:nutripatrol,env:${{ matrix.env }}
34 changes: 24 additions & 10 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,27 @@
name: Run release-please
on:
push:
branches:
- main
push:
branches:
- main

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: GoogleCloudPlatform/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: simple
release-please:
runs-on: ubuntu-latest
steps:
- uses: GoogleCloudPlatform/[email protected]
with:
# We can't use GITHUB_TOKEN here because, github actions can't provocate actions
# see: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow
# So this is a personnal access token
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
release-type: simple
changelog-types: |
[
{"type":"feat","section":"Features","hidden":false},
{"type":"fix","section":"Bug Fixes","hidden":false},
{"type":"style","section":"Technical","hidden":false},
{"type":"docs","section":"Technical","hidden":false},
{"type":"test","section":"Technical","hidden":false},
{"type":"chore","section":"Technical","hidden":false},
{"type":"refactor","section":"Technical","hidden":false}
]

0 comments on commit 0a85f3a

Please sign in to comment.