diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 0819c9d..89b166a 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -7,14 +7,14 @@ on:
jobs:
build:
-
+
runs-on: ubuntu-latest
-
+
steps:
- - uses: actions/checkout@master
- - name: Verify action syntax
- # The action should not publish any real changes, but should succeed.
- uses: './'
- with:
- github_token: '${{ secrets.GITHUB_TOKEN }}'
- branch: '${{ github.ref }}'
\ No newline at end of file
+ - uses: actions/checkout@master
+ - name: Verify action syntax
+ # The action should not publish any real changes, but should succeed.
+ uses: './'
+ with:
+ github_token: '${{ secrets.GITHUB_TOKEN }}'
+ branch: '${{ github.ref }}'
diff --git a/README.md b/README.md
index ed8c8ac..e1c30fa 100644
--- a/README.md
+++ b/README.md
@@ -39,37 +39,11 @@ jobs:
branch: ${{ github.ref }}
```
-An example workflow to authenticate with GitHub Platform via Deploy Keys or in general SSH:
-
-```yaml
-jobs:
- build:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
- with:
- ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
- - name: Create local changes
- run: |
- ...
- - name: Commit files
- run: |
- git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
- git config --local user.name "github-actions[bot]"
- git commit -m "Add changes" -a
- - name: Push changes
- uses: ad-m/github-push-action@master
- with:
- branch: ${{ github.ref }}
- ssh: true
-```
-
### Inputs
| name | value | default | description |
| ---- | ----- | ------- | ----------- |
| 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)
or a repo scoped
[Personal Access Token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token). |
-| ssh | boolean | false | Determines if ssh is used. |
| branch | string | (default) | Destination branch to push changes.
Can be passed in using `${{ github.ref }}`. |
| force | boolean | false | Determines if force push is used. |
| tags | boolean | false | Determines if `--tags` is used. |
diff --git a/action.yml b/action.yml
index 1f3d910..d382fad 100644
--- a/action.yml
+++ b/action.yml
@@ -13,9 +13,6 @@ inputs:
description: 'GitHub url or GitHub Enterprise url'
required: true
default: ${{ github.server_url }}
- ssh:
- description: 'Specify if ssh should be used'
- required: false
repository:
description: 'Repository name to push. Default or empty value represents current github repository (${GITHUB_REPOSITORY})'
default: ''
diff --git a/start.sh b/start.sh
index 116ee83..5faf53a 100755
--- a/start.sh
+++ b/start.sh
@@ -23,13 +23,7 @@ fi
cd ${INPUT_DIRECTORY}
-
-if ${INPUT_SSH}; then
- remote_repo="git@${INPUT_GITHUB_URL}:${REPOSITORY}.git"
-else
- remote_repo="${INPUT_GITHUB_URL_PROTOCOL}//${GITHUB_ACTOR}:${INPUT_GITHUB_TOKEN}@${INPUT_GITHUB_URL}/${REPOSITORY}.git"
-fi
-
+remote_repo="${INPUT_GITHUB_URL_PROTOCOL}//${GITHUB_ACTOR}:${INPUT_GITHUB_TOKEN}@${INPUT_GITHUB_URL}/${REPOSITORY}.git"
git config --local --add safe.directory ${INPUT_DIRECTORY}
git push "${remote_repo}" HEAD:${INPUT_BRANCH} --follow-tags $_FORCE_OPTION $_TAGS;