|
| 1 | +on: |
| 2 | + workflow_dispatch: |
| 3 | + |
| 4 | +jobs: |
| 5 | + deploy_archivematica_staging: |
| 6 | + uses: ./.github/workflows/deploy_archivematica_staging.yml |
| 7 | + secrets: inherit |
| 8 | + |
| 9 | + deploy: |
| 10 | + runs-on: ubuntu-latest |
| 11 | + needs: |
| 12 | + - deploy_archivematica_staging |
| 13 | + environment: prod |
| 14 | + env: |
| 15 | + ARCHIVEMATICA_DASHBOARD_IMAGE_TAG: ${{ needs.deploy_archivematica_staging.outputs.ARCHIVEMATICA_DASHBOARD_IMAGE_TAG }} |
| 16 | + ARCHIVEMATICA_MCP_SERVER_IMAGE_TAG: ${{ needs.deploy_archivematica_staging.outputs.ARCHIVEMATICA_MCP_SERVER_IMAGE_TAG }} |
| 17 | + ARCHIVEMATICA_MCP_CLIENT_IMAGE_TAG: ${{ needs.deploy_archivematica_staging.outputs.ARCHIVEMATICA_MCP_CLIENT_IMAGE_TAG }} |
| 18 | + ARCHIVEMATICA_STORAGE_SERVICE_IMAGE_TAG: ${{ needs.deploy_archivematica_staging.outputs.ARCHIVEMATICA_STORAGE_SERVICE_IMAGE_TAG }} |
| 19 | + defaults: |
| 20 | + run: |
| 21 | + working-directory: ./archivematica/prod_cluster |
| 22 | + steps: |
| 23 | + - uses: actions/checkout@v5 |
| 24 | + - name: Setup Terraform |
| 25 | + uses: hashicorp/setup-terraform@v3 |
| 26 | + with: |
| 27 | + cli_config_credentials_token: ${{ secrets.TERRAFORM_API_TOKEN }} |
| 28 | + - name: Terraform Init |
| 29 | + run: terraform init |
| 30 | + - name: Terraform Validate |
| 31 | + run: terraform validate -no-color |
| 32 | + - name: Terraform Plan |
| 33 | + run: | |
| 34 | + terraform plan -no-color -input=false \ |
| 35 | + -var "image_overrides={ |
| 36 | + \"archivematica-dashboard-prod\" = \"$ARCHIVEMATICA_DASHBOARD_IMAGE_TAG\", |
| 37 | + \"archivematica-mcp-client-prod\" = \"$ARCHIVEMATICA_MCP_CLIENT_IMAGE_TAG\", |
| 38 | + \"archivematica-mcp-server-prod\" = \"$ARCHIVEMATICA_MCP_SERVER_IMAGE_TAG\", |
| 39 | + \"archivematica-storage-service-prod\" = \"$ARCHIVEMATICA_STORAGE_SERVICE_IMAGE_TAG\", |
| 40 | + }" |
| 41 | + - name: Terraform Apply |
| 42 | + run: | |
| 43 | + terraform apply -auto-approve -input=false \ |
| 44 | + -var "image_overrides={ |
| 45 | + \"archivematica-dashboard-prod\" = \"$ARCHIVEMATICA_DASHBOARD_IMAGE_TAG\", |
| 46 | + \"archivematica-mcp-client-prod\" = \"$ARCHIVEMATICA_MCP_CLIENT_IMAGE_TAG\", |
| 47 | + \"archivematica-mcp-server-prod\" = \"$ARCHIVEMATICA_MCP_SERVER_IMAGE_TAG\", |
| 48 | + \"archivematica-storage-service-prod\" = \"$ARCHIVEMATICA_STORAGE_SERVICE_IMAGE_TAG\", |
| 49 | + }" |
0 commit comments