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

deploy from a fork using a workflow #5668

Merged
merged 4 commits into from
Sep 12, 2022
Merged

Conversation

jakecoffman
Copy link
Member

Since fork PRs can only get read access from GITHUB_TOKEN, we can't use the docker-branch-releases.yml workflow to deploy a fork to GHCR before merging it.

This works around that with a manually dispatched workflow that pulls in the PR code, builds, and deploys it. Since it was kicked off by the team it should have the correct permissions.

Note
While implementing this, I tried to simply git merge main after the gh pr checkout but git errors with fatal: refusing to merge unrelated histories. So I assume the gh command is pulling in the PR as a different tree. To work around that, I squashed the changes and cherry picked them over to main. If anyone has a better or easier solution to that let me know!

@jakecoffman jakecoffman requested a review from a team as a code owner September 8, 2022 21:42
docker build \
-t "$UPDATER_IMAGE:$TAG" \
--build-arg BUILDKIT_INLINE_CACHE=1 \
--cache-from "$BASE_IMAGE" \
Copy link
Member

@Nishnha Nishnha Sep 9, 2022

Choose a reason for hiding this comment

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

cache from ubuntu:20.04 seems a bit strange. Any reason we include this line?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah I agree, I copied this from another workflow.

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.

2 participants