-
Notifications
You must be signed in to change notification settings - Fork 199
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
Improve docker file to allow for caching: Part 1 of many #1036
Conversation
paths-ignore: | ||
- 'docs/**' | ||
workflow_run: |
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.
This was causing this workflow to checkout master instead of the PR we wanted to look at.
So we were pushing to master on every PR.
We should have checked out github.event.workflow_run.head_branch
instead
@@ -1,14 +1,30 @@ | |||
--- | |||
name: Docker Build and Push | |||
on: | |||
concurrency: |
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.
This prevents the workflow from running multiple times for the same code
67f5272
to
c181925
Compare
run: | | ||
[ ${{ env.REF_NAME }} == "master" ] && tagname="latest" || tagname=${{ env.REF_NAME }} | ||
docker run -t --rm kapicorp/kapitan:${tagname} --version | ||
# - name: Test Dockerfile in current ref |
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.
See comment
fbba60c
to
4b8471a
Compare
Proposed Changes
Part 1 of a series of changes from https://github.com/ademariag/kapitan/tree/master/.github/workflows to improve the build process.
no functional changes expected
Done incrementally for easier review