Skip to content

[GH-171] - Update deploy.yml to Send Notifications to Microsoft Teams and Align with Other Repos #293

[GH-171] - Update deploy.yml to Send Notifications to Microsoft Teams and Align with Other Repos

[GH-171] - Update deploy.yml to Send Notifications to Microsoft Teams and Align with Other Repos #293

Workflow file for this run

name: Pull request validation workflow
on:
pull_request:
types:
- opened
- synchronize
- labeled
paths-ignore:
- '**.md'
env:
GCR_TOKEN: ${{ secrets.GCR_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
STEP_SCRIPTS: ${{ github.workspace }}/.github/steps/pull-request
jobs:
update-pr-branch-version:
runs-on: ubuntu-latest
outputs:
new-version: ${{ steps.update-version.outputs.new-version }}
steps:
- name: Python Poetry Action
run: pipx install poetry
- uses: uwit-iam/actions/[email protected]
id: guidance
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- uses: uwit-iam/actions/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
version-guidance: ${{ steps.guidance.outputs.guidance }}
id: update-version
validate-image-quality:
permissions:
contents: write
id-token: write
pull-requests: write
needs: [update-pr-branch-version]
runs-on: ubuntu-latest
env:
APP_VERSION: ${{ needs.update-pr-branch-version.outputs.new-version }}
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Poetry with pip
run: |
python -m pip install --upgrade pip
python -m pip install poetry
poetry --version
- run: |
sudo apt-get -y install jq
poetry run pip install tox uw-it-build-fingerprinter
id: configure
name: Set up environment
- uses: UWIT-IAM/actions/[email protected]
with:
gcloud-token: ${{ secrets.GCR_TOKEN }}
- run: poetry run tox -e build-layers
- name: Run validation checks and tests
run: poetry run tox -e black,flake8,unit-tests
id: run-validations
- name: Cache fingerprinted layers
run: ./scripts/build.sh --cache
- name: Push tag for pull request
run: ${STEP_SCRIPTS}/create-pr-tag.sh -s ${{ env.source_image }}
id: create-pr-tag
env:
source_image: gcr.io/uwit-mci-iam/husky-directory.app:tox
- uses: mshick/add-pr-comment@v1
env:
PR_TAG: ${{ steps.create-pr-tag.outputs.image }}
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
repo-token-user-login: 'github-actions[bot]'
allow-repeats: false
message: |
Download and run the latest build with:
```
./scripts/run-development-server.sh -i ${{ env.PR_TAG }}
```