Skip to content

Conversation

@DaRosenberg
Copy link
Contributor

Also:

  • Removes unnecessary 'jq -c' transformations
  • Comments out schedule triggers
- name: Check out merge result
uses: actions/checkout@v3
with:
ref: ${{ github.merge_commit_sha }}
Copy link
Member

Choose a reason for hiding this comment

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

Is this definitely the correct variable? I was expecting github.event.pull_request.merge_commit_sha

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It definitely works, it yields a full commit hash.

But I think maybe we should just remove the ref input altogether because I think when triggered by a PR, that's the default behavior?

Copy link
Member

Choose a reason for hiding this comment

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

Ah that's possibly how this is working then, because there's no property like this on the github context according to the docs: https://docs.github.com/en/actions/learn-github-actions/contexts#github-context

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No no, I printed the value of it whilst developing, it printed a full commit hash.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Or, hm... actually maybe it was the checkout action that printed it.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah the checkout action defaults to github.ref if no value is supplied. And in the context of a PR, github.ref is the merge branch

- cron: "0 1 * * *" # Runs nightly at 01:00 UTC.
# Uncomment to run this workflow on a schedule:
#schedule:
# - cron: "0 1 * * *" # Run nightly at 01:00 UTC.
Copy link
Member

Choose a reason for hiding this comment

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

Might be wise to change this schedule because it clashes with the merge from production schedule

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What do you reckon we should change it to? 4 times throughout the working day? 9, 12, 15 and 18?

Copy link
Member

Choose a reason for hiding this comment

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

Seems sensible

@DaRosenberg DaRosenberg merged commit 3481a14 into main Oct 18, 2022
@DaRosenberg DaRosenberg deleted the task/validatePr branch October 18, 2022 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants