Skip to content

Commit c1a1c28

Browse files
committed
Add date to branch name
1 parent a429d47 commit c1a1c28

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.github/workflows/main.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,18 @@ jobs:
3232
if: |
3333
${{github.event.pull_request.user.login == 'parthea' && github.event.pull_request.title == 'chore: Add github action to update discovery artifacts'}}
3434
steps:
35+
- name: Get current date
36+
id: date
37+
run: echo "::set-output name=current_date::$(date +'%Y-%m-%d')"
38+
3539
- name: Check out master branch
3640
uses: actions/checkout@v2
3741
with:
3842
ref: refs/heads/master
3943

4044
- name: Create branch
4145
run: |
42-
git checkout -b update-discovery-artifacts
46+
git checkout -b update-discovery-artifacts-${{ steps.date.outputs.current_date }}
4347
4448
- name: Set up Python 3.9
4549
uses: actions/setup-python@v1
@@ -69,7 +73,7 @@ jobs:
6973
working-directory: ./scripts
7074

7175
- name: Push changes
72-
run: git push -f --set-upstream origin update-discovery-artifacts
76+
run: git push -f --set-upstream origin update-discovery-artifacts-${{ steps.date.outputs.current_date }}
7377

7478
- name: Prepare summary for PR Body
7579
id: pr_body
@@ -90,7 +94,7 @@ jobs:
9094
script: |
9195
async function createPR () {
9296
const { owner, repo } = context.repo
93-
const branch = 'update-discovery-artifacts'
97+
const branch = 'update-discovery-artifacts-${{ steps.date.outputs.current_date }}''
9498
let prBody = `${{ steps.pr_body.outputs.change_summary }}`
9599
const prTitle = 'chore: Update discovery artifacts'
96100
const pullRequests = await github.pulls.list({

0 commit comments

Comments
 (0)