-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modernize before arrest netid #3
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
091b3a2
Update to reference GitHub Issues (not JIRA)
miker985 a63d7cb
Update release-on-push-to-main to use Google Artifact Registry instea…
miker985 fa4efd3
Update pull-request template to use GAR not GCR + use fewer GH action…
miker985 e8c06dc
Delete TODO - using 2 actions is fine
miker985 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙏