From 4d420d7a3e17859fb61681d7ad193f4802676eb7 Mon Sep 17 00:00:00 2001 From: Ankit1Kumar <106664699+Ankit1Kumar@users.noreply.github.com> Date: Thu, 25 Jul 2024 21:52:58 +0530 Subject: [PATCH 1/6] Update random.yaml --- .github/workflows/random.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/random.yaml b/.github/workflows/random.yaml index 85a4328..8f0cd1e 100644 --- a/.github/workflows/random.yaml +++ b/.github/workflows/random.yaml @@ -10,3 +10,11 @@ jobs: steps: - name: Echo Message run: echo "Workflow manually triggered." + + - name: Set branch name + run: | + echo "BRANCH_NAME=$(echo "${{ github.ref }}" | sed 's#refs/tags/##')" >> $GITHUB_ENV + + - name: create file + run: touch testing-file-touch-${{ env.BRANCH_NAME }}.txt + From a557a14fa647a85ba3cf956b6c66291bafce63a8 Mon Sep 17 00:00:00 2001 From: Ankit1Kumar <106664699+Ankit1Kumar@users.noreply.github.com> Date: Thu, 25 Jul 2024 21:56:25 +0530 Subject: [PATCH 2/6] Update test.yaml --- .github/workflows/test.yaml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 9ec945b..be60479 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,14 +1,15 @@ -name: Manual Trigger Workflow +name: Manual Trigger Workflow run on: - create: - paths: - - '.github/workflows/random.yaml' - + workflow_run: + workflows: [Upload build_artifact_release] + types: + - completed jobs: build: runs-on: ubuntu-latest steps: - - name: Echo Message - run: echo "Workflow manually triggered." + - name: Echo Message copy fuile + run: | + cp From 662556adae79dd5e6625df0d1b38e39a624692bd Mon Sep 17 00:00:00 2001 From: Ankit1Kumar <106664699+Ankit1Kumar@users.noreply.github.com> Date: Thu, 25 Jul 2024 21:58:29 +0530 Subject: [PATCH 3/6] Update test.yaml --- .github/workflows/test.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index be60479..c23fe13 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -2,7 +2,7 @@ name: Manual Trigger Workflow run on: workflow_run: - workflows: [Upload build_artifact_release] + workflows: [Manual Trigger Workflow] types: - completed jobs: @@ -12,4 +12,4 @@ jobs: steps: - name: Echo Message copy fuile run: | - cp + cp touch testing-file-touch-${{ github.event.workflow_run.head_branch }}.txt new.txt From 9d042257464ff9a6196a7fdeebdb8ff33cae00ce Mon Sep 17 00:00:00 2001 From: Ankit1Kumar <106664699+Ankit1Kumar@users.noreply.github.com> Date: Thu, 25 Jul 2024 22:02:16 +0530 Subject: [PATCH 4/6] Update random.yaml --- .github/workflows/random.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/random.yaml b/.github/workflows/random.yaml index 8f0cd1e..c083cd1 100644 --- a/.github/workflows/random.yaml +++ b/.github/workflows/random.yaml @@ -16,5 +16,8 @@ jobs: echo "BRANCH_NAME=$(echo "${{ github.ref }}" | sed 's#refs/tags/##')" >> $GITHUB_ENV - name: create file - run: touch testing-file-touch-${{ env.BRANCH_NAME }}.txt + run: | + mkdir -p test + cd test + touch testing-file-touch-${{ env.BRANCH_NAME }}.txt From 67e8819afc9fa121132665565d06e47eae5ef785 Mon Sep 17 00:00:00 2001 From: Ankit1Kumar <106664699+Ankit1Kumar@users.noreply.github.com> Date: Thu, 25 Jul 2024 22:07:30 +0530 Subject: [PATCH 5/6] Update random.yaml --- .github/workflows/random.yaml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/random.yaml b/.github/workflows/random.yaml index c083cd1..075385c 100644 --- a/.github/workflows/random.yaml +++ b/.github/workflows/random.yaml @@ -13,11 +13,12 @@ jobs: - name: Set branch name run: | - echo "BRANCH_NAME=$(echo "${{ github.ref }}" | sed 's#refs/tags/##')" >> $GITHUB_ENV + echo "BRANCH_NAME=$(echo "${{ github.ref }}" | sed 's#refs/heads/##')" >> $GITHUB_ENV - - name: create file + - name: Create file with content run: | - mkdir -p test - cd test - touch testing-file-touch-${{ env.BRANCH_NAME }}.txt + mkdir -p test + cd test + echo "hello" > testing-file-touch-${{ env.BRANCH_NAME }}.txt + From c4125489bd97f9f25aa5987e9fdc97418e50ce80 Mon Sep 17 00:00:00 2001 From: Ankit1Kumar <106664699+Ankit1Kumar@users.noreply.github.com> Date: Thu, 25 Jul 2024 22:10:21 +0530 Subject: [PATCH 6/6] Create testing-file-touch-testing-branch.txt --- testing-file-touch-testing-branch.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 testing-file-touch-testing-branch.txt diff --git a/testing-file-touch-testing-branch.txt b/testing-file-touch-testing-branch.txt new file mode 100644 index 0000000..7a30dec --- /dev/null +++ b/testing-file-touch-testing-branch.txt @@ -0,0 +1 @@ +testing-file-touch-testing-branch.txt hello