-
Notifications
You must be signed in to change notification settings - Fork 142
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
Add automatic release preparation workflow #393
Conversation
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.
Several changes required on the workflow. Also missing: link to passing run of applying this change.
if: ${{ always() }} | ||
run: | | ||
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Cache retrieval' | ||
echo STEP_ID="auto_release" >> $GITHUB_ENV |
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.
Almost the same STEP_ID as in L34 - use something more approriate in either place
persist-credentials: false | ||
|
||
- name: Activate Ruby 2.6 | ||
uses: actions/setup-ruby@v1 |
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 and the caching step below are replaced by
pdk-templates/moduleroot/.github/workflows/pr_test.yml.erb
Lines 39 to 44 in b8667b5
- name: Activate Ruby 2.7 | |
uses: ruby/setup-ruby@v1 | |
if: ${{ github.repository_owner == '<%= common['owner'] %>' }} | |
with: | |
ruby-version: "2.7" | |
bundler-cache: true |
- name: Activate Ruby 2.6 | ||
uses: actions/setup-ruby@v1 | ||
with: | ||
ruby-version: "2.6" |
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.
if we're unable to use ruby2.7 for something we need to ticket up the blocker and link here.
|
||
- name: Bundler Setup | ||
run: | | ||
buildevents cmd $TRACE_ID $STEP_ID 'bundle config path vendor/gems' -- bundle config path vendor/gems |
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.
Note how the new setup ruby action (see above) also makes this obsolete
|
||
- name: Append PDK to Gemfile | ||
run: | | ||
echo "gem 'pdk'" >> Gemfile |
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 needs to be done before the caching step calculates the hashFiles
|
||
- name: "PDK Release prep" | ||
run: | | ||
buildevents cmd $TRACE_ID $STEP_ID 'pdk release prep' -- ./vendor/bins/pdk release prep --force |
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.
Does this need to be a gem or can we use the https://github.com/puppetlabs/pdk-docker image, or what about the puppet/iac_release
docker container @carabasdaniel built?
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.
I'll try it with the pdk-docker image -> the iac_release container is built as a wrap-around the pdk release command and uses a mountable ssh key (we don't want to use that here)
git config --local user.email "action@github.com" | ||
git config --local user.name "GitHub Action" | ||
git add . | ||
git commit -m "Auto-Release prep" |
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.
should be Release Prep v#{version}
according to the docs
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.
Changing it to Release Prep v#{version} according to documentation
No description provided.