Skip to content

Commit df5a7d7

Browse files
committed
fix(ci): Fix create-release.yml workflow
1 parent 5302814 commit df5a7d7

File tree

1 file changed

+24
-8
lines changed

1 file changed

+24
-8
lines changed

.github/workflows/create-release.yml

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
branches:
55
- main
66
- dry-run-create-release
7+
- GH-169
8+
workflow_dispatch:
79

810
env:
911
STEP_SCRIPTS: ${{ github.workspace }}/.github/steps/create-release
@@ -40,31 +42,45 @@ jobs:
4042
- uses: UWIT-IAM/actions/configure-gcloud-docker-gcloud-v101@0.1.17
4143
with:
4244
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+
4558
- run: |
4659
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: |
4964
poetry run tox -e build-layers \
50-
-- -t ${{ env.version }} --release ${{ env.version }} --cache \
65+
-- -- -t ${{ env.version }} --release ${{ env.version }} --cache \
5166
--build-arg HUSKY_DIRECTORY_VERSION=${{ env.version }}
5267
poetry run tox -e unit-tests
5368
# Build layers with the -k option to avoid installing a lot of
5469
# unnecessary dependencies. We can also skip black/flake8 for
5570
# this phase, because the code has already been accepted into
5671
# the repository.
57-
name: Validate build
5872

5973
- name: Create release ${{ needs.configure-release.outputs.version }}
6074
uses: ncipollo/release-action@v1
6175
with:
6276
tag: ${{ needs.configure-release.outputs.version }}
6377
if: github.ref == 'refs/heads/main'
6478

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 }}
6681
if: github.ref == 'refs/heads/main'
6782

68-
- run: |
83+
- name: Deploy
84+
run: |
6985
./scripts/deploy.sh -t dev -v ${{ env.version }} \
7086
${{ github.ref != 'refs/heads/main' && '-x' || '' }}

0 commit comments

Comments
 (0)