v3.0.0 #197
Workflow file for this run
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: Deploy sites (production) | |
on: | |
push: | |
tags: | |
- 'v[0-9]+.[0-9]+.[0-9]+' | |
jobs: | |
version: | |
runs-on: ubuntu-latest | |
steps: | |
- id: tag_version | |
run: | | |
REF=$(echo $GITHUB_REF | cut -d / -f 3) | |
[[ "$GITHUB_REF" =~ ^refs/tags.*$ ]] && VERSION="$REF" || VERSION="${REF}-${GITHUB_SHA::7}" | |
echo "version=$VERSION" >> $GITHUB_OUTPUT | |
outputs: | |
version: ${{ steps.tag_version.outputs.version }} | |
notify-start: | |
needs: [version] | |
uses: parameter1/actions/.github/workflows/notify-start.yml@main | |
secrets: inherit | |
with: | |
version: ${{ needs.version.outputs.version }} | |
post-deploy-failure: | |
if: failure() | |
needs: [notify-start, build-sites, deploy-sites] | |
uses: parameter1/actions/.github/workflows/notify-fail.yml@main | |
secrets: inherit | |
with: | |
slack-thread: ${{ needs.notify-start.outputs.slack-thread }} | |
post-deploy-complete: | |
if: success() | |
needs: [notify-start, build-sites, deploy-sites] | |
uses: parameter1/actions/.github/workflows/notify-complete.yml@main | |
secrets: inherit | |
with: | |
slack-thread: ${{ needs.notify-start.outputs.slack-thread }} | |
###################### | |
# Add websites here! # | |
###################### | |
build-sites: | |
needs: [version] | |
uses: parameter1/actions/.github/workflows/website-build-push-test.yml@main | |
strategy: | |
matrix: | |
############################################### | |
#v# Make sure this matches the site matrix! #v# | |
############################################### | |
site: | |
- { dir: ccnewsnow.com, stack: virgon, id: 60c28bc3d28860bc334ebcb2, account: diverse, tenant: diverse_all, rancher_label: cox-matthews-associates-ccnewsnow.com } | |
- { dir: diverseeducation.com, stack: virgon, id: 60c281c6d28860bc33464ae0, account: diverse, tenant: diverse_all, rancher_label: cox-matthews-associates-diverseeducation.com } | |
- { dir: diversemilitary.net, stack: virgon, id: 60c28c0dd28860bc334ed723, account: diverse, tenant: diverse_all, rancher_label: cox-matthews-associates-diversemilitary.net } | |
- { dir: divhealth.net, stack: virgon, id: 60c28c4bd28860bc334f485d, account: diverse, tenant: diverse_all, rancher_label: cox-matthews-associates-divhealth.net } | |
############################################### | |
#^# Make sure this matches the site matrix! #^# | |
############################################### | |
with: | |
ecr_registry: ${{ vars.AWS_ECR_REGISTRY }} | |
docker_image: ${{ vars.AWS_ECR_REGISTRY }}/mindful-web/websites:${{ matrix.site.account }}-${{ matrix.site.dir }}-${{ needs.version.outputs.version }} | |
site_host: ${{ matrix.site.dir }} | |
push: true | |
secrets: inherit | |
deploy-sites: | |
needs: [version, build-sites] | |
uses: parameter1/actions/.github/workflows/website-deploy-production.yml@main | |
strategy: | |
matrix: | |
############################################### | |
#v# Make sure this matches the site matrix! #v# | |
############################################### | |
site: | |
- { dir: ccnewsnow.com, stack: virgon, id: 60c28bc3d28860bc334ebcb2, account: diverse, tenant: diverse_all, rancher_label: cox-matthews-associates-ccnewsnow.com } | |
- { dir: diverseeducation.com, stack: virgon, id: 60c281c6d28860bc33464ae0, account: diverse, tenant: diverse_all, rancher_label: cox-matthews-associates-diverseeducation.com } | |
- { dir: diversemilitary.net, stack: virgon, id: 60c28c0dd28860bc334ed723, account: diverse, tenant: diverse_all, rancher_label: cox-matthews-associates-diversemilitary.net } | |
- { dir: divhealth.net, stack: virgon, id: 60c28c4bd28860bc334f485d, account: diverse, tenant: diverse_all, rancher_label: cox-matthews-associates-divhealth.net } | |
############################################### | |
#^# Make sure this matches the site matrix! #^# | |
############################################### | |
with: | |
ecr_registry: ${{ vars.AWS_ECR_REGISTRY }} | |
docker_image: ${{ vars.AWS_ECR_REGISTRY }}/mindful-web/websites:${{ matrix.site.account }}-${{ matrix.site.dir }}-${{ needs.version.outputs.version }} | |
infra_stack: ${{ matrix.site.stack }} | |
rancher_label_key: mindful-web-website | |
rancher_label_val: ${{ matrix.site.rancher_label }} | |
site_dir: ${{ matrix.site.dir }} | |
site_id: ${{ matrix.site.id }} | |
tenant: ${{ matrix.site.tenant }} | |
version: ${{ needs.version.outputs.version }} | |
secrets: inherit |