File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -20,13 +20,20 @@ jobs:
20
20
steps :
21
21
- name : Checkout
22
22
23
+ with :
24
+ persist-credentials : false
23
25
- name : Determine year
24
26
id : year
25
27
run : echo "::set-output name=value::$(date +%Y)"
26
28
- name : Switch to '${{env.BRANCH}}'
27
29
run : |
30
+ CREDENTIALS="x-access-token:$GITHUB_TOKEN"
31
+ URL="https://[email protected] /${{github.repository}}.git"
32
+ git remote set-url origin $URL
28
33
git fetch origin +refs/heads/$BRANCH:refs/heads/$BRANCH || true
29
34
git checkout $BRANCH || git checkout -b $BRANCH
35
+ env :
36
+ GITHUB_TOKEN : ${{secrets.AUTOMATION_TOKEN}}
30
37
- name : Update LICENSE
31
38
run : sed -i -E "s/$REGEX/\1${{steps.year.outputs.value}}\2/" LICENSE
32
39
- name : Check for changes
42
49
git config user.email ${{secrets.AUTOMATION_EMAIL}}
43
50
git add LICENSE
44
51
git commit -m "chore(license): update year to $YEAR"
52
+ CREDENTIALS="x-access-token:$GITHUB_TOKEN"
53
+ URL="https://[email protected] /${{github.repository}}.git"
54
+ git remote set-url origin $URL
45
55
git push --force origin $BRANCH
46
56
env :
57
+ GITHUB_TOKEN : ${{secrets.AUTOMATION_TOKEN}}
47
58
YEAR : ${{steps.year.outputs.value}}
48
59
- name : Create pull request
49
60
if : steps.changes.outputs.exist
Original file line number Diff line number Diff line change 19
19
steps :
20
20
- name : Checkout
21
21
22
+ with :
23
+ persist-credentials : false
22
24
- name : Determine version
23
25
id : node-version
24
26
run : |
29
31
echo "::set-output name=old::$OLD_VERSION"
30
32
- name : Switch to '${{env.BRANCH}}'
31
33
run : |
34
+ CREDENTIALS="x-access-token:$GITHUB_TOKEN"
35
+ URL="https://[email protected] /${{github.repository}}.git"
36
+ git remote set-url origin $URL
32
37
git fetch origin +refs/heads/$BRANCH:refs/heads/$BRANCH || true
33
38
git checkout $BRANCH || git checkout -b $BRANCH
39
+ env :
40
+ GITHUB_TOKEN : ${{secrets.AUTOMATION_TOKEN}}
34
41
- name : Update .nvmrc
35
42
run : echo ${{steps.node-version.outputs.new}} > .nvmrc
36
43
- name : Check for changes
45
52
git config user.email ${{secrets.AUTOMATION_EMAIL}}
46
53
git add .nvmrc
47
54
git commit -m "chore(node): bump from $OLD_VERSION to $NEW_VERSION"
55
+ CREDENTIALS="x-access-token:$GITHUB_TOKEN"
56
+ URL="https://[email protected] /${{github.repository}}.git"
57
+ git remote set-url origin $URL
48
58
git push --force origin $BRANCH
49
59
env :
60
+ GITHUB_TOKEN : ${{secrets.AUTOMATION_TOKEN}}
50
61
NEW_VERSION : ${{steps.node-version.outputs.new}}
51
62
OLD_VERSION : ${{steps.node-version.outputs.old}}
52
63
- name : Create pull request
You can’t perform that action at this time.
0 commit comments