|
4 | 4 | branches:
|
5 | 5 | - main
|
6 | 6 | - dry-run-create-release
|
| 7 | + - GH-169 |
| 8 | + workflow_dispatch: |
7 | 9 |
|
8 | 10 | env:
|
9 | 11 | STEP_SCRIPTS: ${{ github.workspace }}/.github/steps/create-release
|
@@ -40,31 +42,45 @@ jobs:
|
40 | 42 | - uses: UWIT-IAM/actions/configure-gcloud-docker-gcloud-v101@0.1.17
|
41 | 43 | with:
|
42 | 44 | gcloud-token: ${{ secrets.GCR_TOKEN }}
|
43 |
| - - name: Install poetry |
44 |
| - uses: abatilo/actions-poetry@v2.1.6 |
| 45 | + |
| 46 | + - name: Set up Python 3.10 |
| 47 | + uses: actions/setup-python@v4 |
| 48 | + with: |
| 49 | + python-version: '3.10' |
| 50 | + |
| 51 | + - name: Install Poetry with pip |
| 52 | + run: | |
| 53 | + python -m pip install --upgrade pip |
| 54 | + python -m pip install poetry |
| 55 | + poetry --version |
| 56 | +
|
| 57 | +
|
45 | 58 | - run: |
|
46 | 59 | sudo apt-get -y install jq
|
47 |
| - poetry run pip install uw-it-build-fingerprinter tox |
48 |
| - - run: | |
| 60 | + poetry run pip install tox uw-it-build-fingerprinter |
| 61 | +
|
| 62 | + - name: Validate Build and Test |
| 63 | + run: | |
49 | 64 | poetry run tox -e build-layers \
|
50 |
| - -- -t ${{ env.version }} --release ${{ env.version }} --cache \ |
| 65 | + -- -- -t ${{ env.version }} --release ${{ env.version }} --cache \ |
51 | 66 | --build-arg HUSKY_DIRECTORY_VERSION=${{ env.version }}
|
52 | 67 | poetry run tox -e unit-tests
|
53 | 68 | # Build layers with the -k option to avoid installing a lot of
|
54 | 69 | # unnecessary dependencies. We can also skip black/flake8 for
|
55 | 70 | # this phase, because the code has already been accepted into
|
56 | 71 | # the repository.
|
57 |
| - name: Validate build |
58 | 72 |
|
59 | 73 | - name: Create release ${{ needs.configure-release.outputs.version }}
|
60 | 74 | uses: ncipollo/release-action@v1
|
61 | 75 | with:
|
62 | 76 | tag: ${{ needs.configure-release.outputs.version }}
|
63 | 77 | if: github.ref == 'refs/heads/main'
|
64 | 78 |
|
65 |
| - - run: docker push gcr.io/uwit-mci-iam/husky-directory:${{ env.version }} |
| 79 | + - name: Push Docker image |
| 80 | + run: docker push gcr.io/uwit-mci-iam/husky-directory:${{ env.version }} |
66 | 81 | if: github.ref == 'refs/heads/main'
|
67 | 82 |
|
68 |
| - - run: | |
| 83 | + - name: Deploy |
| 84 | + run: | |
69 | 85 | ./scripts/deploy.sh -t dev -v ${{ env.version }} \
|
70 | 86 | ${{ github.ref != 'refs/heads/main' && '-x' || '' }}
|
0 commit comments