File tree Expand file tree Collapse file tree 4 files changed +10
-45
lines changed
Expand file tree Collapse file tree 4 files changed +10
-45
lines changed Original file line number Diff line number Diff line change 77jobs :
88
99 build :
10-
10+
1111 runs-on : ubuntu-latest
12-
12+
1313 steps :
14- - uses : actions/checkout@master
15- - name : Verify action syntax
16- # The action should not publish any real changes, but should succeed.
17- uses : ' ./'
18- with :
19- github_token : ' ${{ secrets.GITHUB_TOKEN }}'
20- branch : ' ${{ github.ref }}'
14+ - uses : actions/checkout@master
15+ - name : Verify action syntax
16+ # The action should not publish any real changes, but should succeed.
17+ uses : ' ./'
18+ with :
19+ github_token : ' ${{ secrets.GITHUB_TOKEN }}'
20+ branch : ' ${{ github.ref }}'
Original file line number Diff line number Diff line change @@ -39,37 +39,11 @@ jobs:
3939 branch : ${{ github.ref }}
4040` ` `
4141
42- An example workflow to authenticate with GitHub Platform via Deploy Keys or in general SSH:
43-
44- ` ` ` yaml
45- jobs :
46- build :
47- runs-on : ubuntu-latest
48- steps :
49- - uses : actions/checkout@v3
50- with :
51- ssh-key : ${{ secrets.SSH_PRIVATE_KEY }}
52- - name : Create local changes
53- run : |
54- ...
55- - name : Commit files
56- run : |
57- git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
58- git config --local user.name "github-actions[bot]"
59- git commit -m "Add changes" -a
60- - name : Push changes
61- uses : ad-m/github-push-action@master
62- with :
63- branch : ${{ github.ref }}
64- ssh: true
65- ```
66-
6742### Inputs
6843
6944| name | value | default | description |
7045| ---- | ----- | ------- | ----------- |
7146| github_token | string | ` ${{ github.token }}` | [GITHUB_TOKEN](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow) <br /> or a repo scoped <br /> [Personal Access Token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token). |
72- | ssh | boolean | false | Determines if ssh is used. |
7347| branch | string | (default) | Destination branch to push changes. <br /> Can be passed in using `${{ github.ref }}`. |
7448| force | boolean | false | Determines if force push is used. |
7549| tags | boolean | false | Determines if `--tags` is used. |
Original file line number Diff line number Diff line change @@ -13,9 +13,6 @@ inputs:
1313 description : ' GitHub url or GitHub Enterprise url'
1414 required : true
1515 default : ${{ github.server_url }}
16- ssh :
17- description : ' Specify if ssh should be used'
18- required : false
1916 repository :
2017 description : ' Repository name to push. Default or empty value represents current github repository (${GITHUB_REPOSITORY})'
2118 default : ' '
Original file line number Diff line number Diff line change 2323
2424cd ${INPUT_DIRECTORY}
2525
26-
27- if ${INPUT_SSH} ; then
28- remote_repo=" git@${INPUT_GITHUB_URL} :${REPOSITORY} .git"
29- else
30- remote_repo=" ${INPUT_GITHUB_URL_PROTOCOL} //${GITHUB_ACTOR} :${INPUT_GITHUB_TOKEN} @${INPUT_GITHUB_URL} /${REPOSITORY} .git"
31- fi
32-
26+ remote_repo=" ${INPUT_GITHUB_URL_PROTOCOL} //${GITHUB_ACTOR} :${INPUT_GITHUB_TOKEN} @${INPUT_GITHUB_URL} /${REPOSITORY} .git"
3327git config --local --add safe.directory ${INPUT_DIRECTORY}
3428
3529git push " ${remote_repo} " HEAD:${INPUT_BRANCH} --follow-tags $_FORCE_OPTION $_TAGS ;
You can’t perform that action at this time.
0 commit comments