Skip to content
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

Migrate to gar #21

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Migrate to gar #21

wants to merge 2 commits into from

Conversation

miker985
Copy link
Collaborator

@miker985 miker985 commented Sep 18, 2024

nginx-saml-proxy is a core piece of the example-flask-app that several MCI apps are based on.

This successfully ran and pushed a new image to our "containers" registry in GAR in this Action run

I haven't actually tested it live because I don't think there's anything about this that meaningfully impacts that.

It appears to me that the ghcr.io image wasn't even used as gcp-k8 shows nginx-saml-proxy is a docker.io image so I'll need to spin this up in dev and see if anything unfortunate happens...

REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
REGISTRY: us-docker.pkg.dev/uwit-mci-iam/containers
OWNER_IMAGE: ${{ github.repository }}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updating REGISTRY is pretty straight-forward, but getting the image name right isn't.

github.repository is in this case uwit-iam/nginx-saml-proxy but we only want nginx-saml-proxy...

id: image_name
run: |
# GH=uwit-iam/nginx-saml-proxy; echo ${GH#*/} returns "nginx-saml-proxy"
echo "IMAGE_NAME=${OWNER_IMAGE#*/}" >> $GITHUB_OUTPUT
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... so we compute it

@EricHorst
Copy link
Contributor

You may already be thinking of this but remember this repo is public so be thoughtful about what is hardcoded in workflows and files.
The current workflow is parameterized so that the registry, image name etc are supplied by variables. This makes the workflow very generic and doesn't reveal anything at all. We may not need to be so paranoid but wanted to remind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants