checkout icon indicating copy to clipboard operation
checkout copied to clipboard

Changes made to repository are not available to other workflows being called

Open vvkjndl opened this issue 2 years ago • 1 comments

I have a file called release.version in the repository.

I have a workflow that calls two workflows using uses:.

name: my workflow

on:
  workflow_dispatch:

jobs:
  workflowA:
    uses: ./.github/workflows/workflowA.yaml
    secrets: inherit

  workflowB:
    needs: [ workflowA ]
    uses: ./.github/workflows/workflowB.yaml
    secrets: inherit

workflowA has made a change in the file release.version.

This change is not available to the workflowB. workflowB always sees the last version of the file when being called within.

Same thing is happening with actions/download-artifacts and actions/upload-artifacts.

workflowA is doing actions/upload-artifacts. workflowB can't find these artifacts.

Am I missing something? I am using actions/checkout@v2 in both of the workflows.

Because of this behaviour, I am currently under the limitation to run these workflows individually preventing me to automate the workflow runs in a single workflow.

vvkjndl avatar Jul 17 '22 16:07 vvkjndl

@vvkjndl had the same problem. But I managed to fix it: https://docs.github.com/en/actions/using-workflows/reusing-workflows#using-inputs-and-secrets-in-a-reusable-workflow

allertec avatar Sep 24 '22 10:09 allertec