Skip to content

fix: fix composite actions paths#203

Closed
awownysz-splunk wants to merge 2 commits into
mainfrom
fix/lightweight-workflow-ADDON-66448
Closed

fix: fix composite actions paths#203
awownysz-splunk wants to merge 2 commits into
mainfrom
fix/lightweight-workflow-ADDON-66448

Conversation

@awownysz-splunk

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

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
Contributor Author

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

@github-actions github-actions Bot locked and limited conversation to collaborators Jul 17, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants