You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have 3 workflows: A build.yml workflow that "builds" and uploads an artifact. This is called by another workflow dev-branch.yml which is triggered by a push event for branches starting with dev/
on:
push:
branches:
- dev/*
workflow_dispatch:
jobs:
build:
uses: ./.github/workflows/build.yml
deploy-dev:
runs-on: [ macos-latest ]
needs: build
steps:
- name: Deploy Dev
run: echo "Dev is being deployed"
Lastly, I have a delete-dev.yml workflow. It uses dawidd6/action-download-artifact@v6 to download the artifact uploaded in the build.yml workflow (used by dev-branch.yml) to use the artifact for subsequent steps.
delete-dev.yml
on:
delete:
branches:
- dev/*
workflow_dispatch:
jobs:
download-artifact:
runs-on: [ macos-latest ]
steps:
- name: Download Artifact
uses: dawidd6/action-download-artifact@v6
with:
workflow: dev-branch.yml
workflow_conclusion: success
commit: ${{ github.event.before }}
name: helloWorld
path: ./
search_artifacts: true
delete-dev-infra:
runs-on: [ macos-latest ]
needs: download-artifact
steps:
- name: Delete Dev Infra
run: echo "This Dev Infra is being deleted..."
Question
How do you configure the dawidd6/action-download-artifact@v6 action so that two branches do not download the same artifact?
I've tested this use case in my repo by creating two branches dev/br-1 and dev/br-2. I make new commits so that each writes its contents to hello_world_one.txt and hello_world_two.txt respectively. This push event triggers dev-branch.yml and the artifacts are unique at this point.
However when I delete both branches, which triggers the delete-dev.yml workflow, both branches download the same artifact. Specifically the artifact that was uploaded last. I even added the commit and search_artifacts parameters in attempt to differentiate the artifacts per this issue: #130
It seems like the file is being overwritten but how is that possible when the files have two different paths? What I expect is for the jobs to download the artifacts they each originally uploaded.
Description
I have 3 workflows: A
build.yml
workflow that "builds" and uploads an artifact. This is called by another workflowdev-branch.yml
which is triggered by a push event for branches starting withdev/
build.yml
dev-branch.yml
Lastly, I have a
delete-dev.yml
workflow. It usesdawidd6/action-download-artifact@v6
to download the artifact uploaded in thebuild.yml
workflow (used bydev-branch.yml
) to use the artifact for subsequent steps.delete-dev.yml
Question
How do you configure the
dawidd6/action-download-artifact@v6
action so that two branches do not download the same artifact?I've tested this use case in my repo by creating two branches
dev/br-1
anddev/br-2
. I make new commits so that each writes its contents tohello_world_one.txt
andhello_world_two.txt
respectively. This push event triggersdev-branch.yml
and the artifacts are unique at this point.However when I delete both branches, which triggers the
delete-dev.yml
workflow, both branches download the same artifact. Specifically the artifact that was uploaded last. I even added thecommit
andsearch_artifacts
parameters in attempt to differentiate the artifacts per this issue: #130It seems like the file is being overwritten but how is that possible when the files have two different paths? What I expect is for the jobs to download the artifacts they each originally uploaded.
Output (exactly the same for both branches)
Also, why is the commit ID not showing up in the output? Thanks.
The text was updated successfully, but these errors were encountered: