Skip to content

Make Actions/Reusable Workflow Calls Use Relative Refs #346

@CodeGat

Description

@CodeGat

Background

Currently, our actions and reusable workflows are in the ORG/REPO/.../REUSABLE@vX format, in which we update the vX for each major version.

This has it's own loopholes, though - if a minor/patch version (from an Entrypoint Workflow POV) actually changes functionality in an intra-workflow/intra-action way that is not compatible, there will be issues.

Implementation Details

For Actions

For actions that are housed in build-cd, we should do the following instead:

- uses: actions/checkout@v5
  with:
    repository: access-nri/build-cd
    ref: ${{ github.workflow_sha }}

- uses: ./.github/actions/ACTION
  # ...

For Workflows

For workflows that are housed in build-cd, we should do the following instead:

uses: ./.github.workflows/WORKFLOW
# ...

Thanks @atteggiani for helping me out coming to this (far better) solution!

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions