fix(ci): Fix failing create-release.yml by updating dependencies #279
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: 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 }} | |
``` |