Skip to content

Create Reusable Workflow for Updating Intra-Workflow Refs #43

@CodeGat

Description

@CodeGat

See second dot point in ACCESS-NRI/build-cd#346 (comment)

Background

We need a less manual way to update the refs for workflows and actions within a inter-repository reusable workflow.

Create a on.workflow_call workflow that infrastructure repositories (eg. documentation-infra, build-cd) can call that:

  • Can update custom actions refs referenced within the callee infrastructure repository (eg. uses: ORG/INFRA_REPO/.github/actions/action@REF
  • Can update reusable workflows referenced within the callee infrastructure repository (eg. uses: ORG/INFRA_REPO/.github/workflows/workflow.yml@REF
  • Can update actions/checkouted callee infrastructure repositories with custom ref: (eg:
    uses: actions/checkout@v5
    with:
      repository: ORG/INFRA_REPO
      ref: REF

This workflow should simply handle the update/commit (generic for any event trigger).

Implementation Details

Entrypoint inputs could be:

with:
  ref: v1.2.3
  update-custom-actions-ref: true
  update-reusable-workflows-ref: true
  update-checked-out-repository-ref: true
  repository: ORG/INFRA_REPO
  path: .github/workflows/*

Which would update all references to ORG/INFRA workflows, actions and checkouts to v1.2.3

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions