PROD - Database backup #1831
This file contains 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: PROD - Database backup | |
on: | |
schedule: | |
- cron: '0 7,19 * * *' # Twice a day: 7am and 7pm UTC | |
workflow_dispatch: | |
jobs: | |
crn-contentful: | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/yldio/asap-hub/node-python-sq:86a189edc900d4e1afdcf3935c697292f69d409b | |
credentials: | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
environment: Production | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup | |
id: setup | |
uses: ./.github/actions/setup-environment | |
with: | |
environment-name: Production | |
- name: Backup | |
uses: ./.github/actions/contentful-backup | |
with: | |
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 }} | |
gp2-contentful: | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/yldio/asap-hub/node-python-sq:86a189edc900d4e1afdcf3935c697292f69d409b | |
credentials: | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
environment: Production | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup | |
id: setup | |
uses: ./.github/actions/setup-environment | |
with: | |
environment-name: Production | |
- name: Backup | |
uses: ./.github/actions/contentful-backup | |
with: | |
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 }} |