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

fix: fix composite actions paths #203

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

Conversation

awownysz-splunk
Copy link
Contributor

@awownysz-splunk awownysz-splunk commented Dec 13, 2023

This PR implements following changes:

  • fixes paths to composite github actions
  • ensures that the same version of reusable workflow and particular composite actions is used

Sample workflow run: https://github.com/splunk/splunk-add-on-for-microsoft-cloud-services/actions/runs/7270633478

Some workarounds needed to be applied in order to achieve the result described above:

  • custom action _called-wf-ref was implemented which allows the reusable workflow to access the ref (tag, branch, etc.) with which it was called (see this issue: make reference accessible in reusable workflow  actions/toolkit#1264)
  • dynamic-uses action was utilised to allow for using the composite actions' versions dynamically - i.e. to be able to apply the ref that was previously extracted with _called-wf-ref

@awownysz-splunk awownysz-splunk requested a review from a team as a code owner December 13, 2023 14:55
@awownysz-splunk awownysz-splunk marked this pull request as draft December 14, 2023 06:29
@awownysz-splunk awownysz-splunk force-pushed the fix/lightweight-workflow-ADDON-66448 branch from 01cc1ed to 50ec106 Compare December 20, 2023 01:15
@awownysz-splunk awownysz-splunk force-pushed the fix/lightweight-workflow-ADDON-66448 branch from d242989 to 1227eae Compare December 20, 2023 03:31
@awownysz-splunk awownysz-splunk marked this pull request as ready for review December 20, 2023 03:37
ref: ${{ steps.get-ref.outputs.caller-ref }}
steps:
- id: get-ref
uses: splunk/addonfactory-workflow-addon-release/.github/actions/_called-wf-ref@fix/lightweight-workflow-ADDON-66448
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please note that this PR can't be merged until this line is changed to uses: splunk/addonfactory-workflow-addon-release/.github/actions/_called-wf-ref@main. This is the only action that is supposed to be always called from main.

@awownysz-splunk awownysz-splunk force-pushed the fix/lightweight-workflow-ADDON-66448 branch from efe070c to 9f1d93d Compare December 20, 2023 12:05
@awownysz-splunk awownysz-splunk marked this pull request as draft December 27, 2023 12:39
@awownysz-splunk
Copy link
Contributor Author

This PR has been put on hold until this GitHub Actions issue is fixed: actions/toolkit#1264

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.

1 participant