DEV - Database backups #1206
This file contains hidden or 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: DEV - Database backups | |
| on: | |
| schedule: | |
| - cron: '0 7 * * MON-FRI' # At 07:00 UTC on every day-of-week from Monday through Friday. | |
| workflow_dispatch: | |
| jobs: | |
| crn-contentful: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ghcr.io/yldio/asap-hub/node-python-sq:92bd02a49ed4fd0c99c86d1966869791bc1530fe | |
| credentials: | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| environment: Development | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Re-Build | |
| uses: ./.github/actions/build-rebuild | |
| - name: Cache build typecheck output | |
| uses: ./.github/actions/cache-unplugged | |
| with: | |
| environment-name: Development | |
| - name: Setup | |
| id: setup | |
| uses: ./.github/actions/setup-environment | |
| with: | |
| environment-name: Development | |
| - name: Build | |
| run: yarn exec "yarn workspaces foreach -vptR --from '{@asap-hub/asap-cli,@asap-hub/crn-server}' run build:babel" | |
| - name: Backup | |
| uses: ./.github/actions/contentful-backup | |
| with: | |
| app: 'crn' | |
| aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| bucket-name: ${{ steps.setup.outputs.crn-contentful-backup-bucket-name }} | |
| contentful-space-id: ${{ steps.setup.outputs.crn-contentful-space-id }} | |
| contentful-environment: ${{ steps.setup.outputs.contentful-environment }} | |
| contentful-token: ${{ secrets.CONTENTFUL_MANAGEMENT_TOKEN }} | |
| data-bucket-name: ${{ steps.setup.outputs.crn-data-backup-bucket-name }} | |
| gp2-contentful: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ghcr.io/yldio/asap-hub/node-python-sq:92bd02a49ed4fd0c99c86d1966869791bc1530fe | |
| credentials: | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| environment: Development | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup | |
| id: setup | |
| uses: ./.github/actions/setup-environment | |
| with: | |
| environment-name: Development | |
| - name: Backup | |
| uses: ./.github/actions/contentful-backup | |
| with: | |
| app: 'gp2' | |
| aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| bucket-name: ${{ steps.setup.outputs.gp2-contentful-backup-bucket-name }} | |
| contentful-space-id: ${{ steps.setup.outputs.gp2-contentful-space-id }} | |
| contentful-environment: ${{ steps.setup.outputs.contentful-environment }} | |
| contentful-token: ${{ secrets.CONTENTFUL_MANAGEMENT_TOKEN }} |