-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from UWIT-IAM/modernize-before-arrest_netid
Modernize before arrest netid
- Loading branch information
Showing
4 changed files
with
57 additions
and
58 deletions.
There are no files selected for viewing
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,15 +20,12 @@ jobs: | |
outputs: | ||
new-version: ${{ steps.update-version.outputs.new-version }} | ||
steps: | ||
- name: Python Poetry Action | ||
uses: abatilo/[email protected] | ||
|
||
- uses: uwit-iam/actions/[email protected] | ||
id: guidance | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- uses: uwit-iam/actions/update-pr-branch-version@0.1 | ||
- uses: uwit-iam/actions/update-pr-branch-version@main | ||
with: | ||
github-token: ${{ env.GITHUB_TOKEN }} | ||
version-guidance: ${{ steps.guidance.outputs.guidance }} | ||
|
@@ -44,28 +41,41 @@ jobs: | |
runs-on: ubuntu-latest | ||
env: | ||
APP_VERSION: ${{ needs.update-pr-branch-version.outputs.new-version }} | ||
pr_tag: pull-request-${{ github.event.pull_request.number }} | ||
pr_tag: pull-request-${{ github.event.pull_request.number }} # e.g., "pull-request-15" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
|
||
- uses: abatilo/[email protected] | ||
- run: | | ||
- name: Set up environment | ||
id: configure | ||
run: | | ||
sudo apt-get -y install jq | ||
pip install poetry | ||
poetry install | ||
id: configure | ||
name: Set up environment | ||
- uses: UWIT-IAM/actions/[email protected] | ||
- name: Auth to Google Cloud | ||
# important! this 'auth' is referenced as `steps.auth` on the next job | ||
id: auth | ||
# https://github.com/google-github-actions/auth#authenticating-via-service-account-key-json-1 | ||
uses: 'google-github-actions/auth@v1' | ||
with: | ||
gcloud-token: ${{ secrets.GCR_TOKEN }} | ||
credentials_json: '${{ secrets.MCI_GCLOUD_AUTH_JSON }}' | ||
token_format: 'access_token' | ||
|
||
- name: Auth to Google Artifact Registry | ||
# https://github.com/google-github-actions/auth#authenticating-to-container-registry-and-artifact-registry | ||
# requires role: roles/iam.serviceAccountTokenCreator | ||
run: |- | ||
echo '${{ steps.auth.outputs.access_token }}' | docker login -u oauth2accesstoken --password-stdin https://us-docker.pkg.dev | ||
- run: | | ||
./scripts/build.sh \ | ||
-t pull-request-${{ env.PR_TAG }} --cache | ||
# this will tag the image with e.g., "pull-request-15" | ||
# NOTE that this produces tags for ${template:app_name}.dependencies, ${template:app_name}.app, ${template:app_name}.tests (but not "${template:app_name}") | ||
./scripts/build.sh -t "${{ env.pr_tag }}" --cache | ||
- run: docker push gcr.io/uwit-mci-iam/${template:app_name}:${{ env.pr_tag }} | ||
# TODO: this container image URI should be dynamically generated from e..g, fingerprints.yaml | ||
- run: docker push us-docker.pkg.dev/uwit-mci-iam/containers/${template:app_name}.app:${{ env.pr_tag }} | ||
|
||
- name: Run validation checks and tests | ||
run: | | ||
|
@@ -76,7 +86,8 @@ jobs: | |
|
||
- uses: mshick/add-pr-comment@v1 | ||
env: | ||
image: gcr.io/uwit-mci-iam/${template:app_name}:${{ env.pr_tag }} | ||
# TODO: this container image URI should be dynamically generated from e..g, fingerprints.yaml | ||
image: us-docker.pkg.dev/uwit-mci-iam/containers/${template:app_name}.app:${{ env.pr_tag }} | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
repo-token-user-login: 'github-actions[bot]' | ||
|
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