3 Commits
v3 ... main

2 changed files with 9 additions and 8 deletions

View File

@ -27,7 +27,7 @@ This is a composite Gitea Action (Linux runner) for deploying repository content
with: with:
fetch-depth: 0 fetch-depth: 0
- name: "Deploy" - name: "Deploy"
uses: https://code.klank.school/riviera/actions-file-deployer@v3 uses: https://code.klank.school/riviera/actions-file-deployer@v4
with: with:
remote-protocol: "sftp" remote-protocol: "sftp"
remote-host: "ftp.example.com" remote-host: "ftp.example.com"
@ -65,7 +65,7 @@ jobs:
with: with:
fetch-depth: 0 fetch-depth: 0
- name: "Deploy" - name: "Deploy"
uses: https://code.klank.school/riviera/actions-file-deployer@v3 uses: https://code.klank.school/riviera/actions-file-deployer@v4
with: with:
remote-protocol: "sftp" remote-protocol: "sftp"
remote-host: "ftp.example.com" remote-host: "ftp.example.com"
@ -100,12 +100,12 @@ jobs:
| ftp-post-sync-commands | no | | Additionnal FTP command to run after sync | | ftp-post-sync-commands | no | | Additionnal FTP command to run after sync |
| webhook | no | | Send webhook event notifications | | webhook | no | | Send webhook event notifications |
| artifacts | no | false | Upload logs/files to artifacts (true, false) | | artifacts | no | false | Upload logs/files to artifacts (true, false) |
| debug | no | false | Publish secrets on the internet (true, false) | | debug | no | false(!)| Publish secrets on the internet (true, false) |
### Notes ### Notes
- Character support for `remote-user` and `remote-password` is limited due to its usage in [.netrc file](https://www.gnu.org/software/inetutils/manual/html_node/The-_002enetrc-file.html) - Character support for `remote-user` and `remote-password` is limited due to its usage in [.netrc file](https://www.gnu.org/software/inetutils/manual/html_node/The-_002enetrc-file.html)
- It should not contain shell/URL special characters, use [percent encoding](https://en.wikipedia.org/wiki/Percent-encoding) instead - It should not contain shell/URL special characters
- File synchronization options - File synchronization options
- `delta`: Transfer only changed files (upload and delete) since last revision - `delta`: Transfer only changed files (upload and delete) since last revision
- Only supported for `push`, `pull_request` and `workflow_dispatch` [events](https://docs.github.com/en/actions/reference/events-that-trigger-workflows) - Only supported for `push`, `pull_request` and `workflow_dispatch` [events](https://docs.github.com/en/actions/reference/events-that-trigger-workflows)
@ -132,7 +132,7 @@ jobs:
"workflow": "workflow name", "workflow": "workflow name",
"job": "deploy", "job": "deploy",
"run_id": "1234567890", "run_id": "1234567890",
"ref": "refs/heads/master", "ref": "refs/heads/main",
"event_name": "push", "event_name": "push",
"actor": "username", "actor": "username",
"message": "commit message", "message": "commit message",
@ -148,7 +148,7 @@ jobs:
"workflow": "workflow name", "workflow": "workflow name",
"job": "deploy", "job": "deploy",
"run_id": "1234567890", "run_id": "1234567890",
"ref": "refs/heads/master", "ref": "refs/heads/main",
"event_name": "push", "event_name": "push",
"actor": "username", "actor": "username",
"message": "commit message", "message": "commit message",

View File

@ -284,9 +284,10 @@ runs:
echo "::group::Prepare files" echo "::group::Prepare files"
domain="code.klank.school"
echo "Event: ${{gitea.event_name}} echo "Event: ${{gitea.event_name}}
Revision: https://gitea.com/${{gitea.repository}}/commit/${{gitea.sha}} Revision: https://${domain}/${{gitea.repository}}/commit/${{gitea.sha}}
Committer: ${{gitea.actor}} Committer: ${{gitea.actor}}
Message: ${{gitea.event.head_commit.message}}" && show_hr Message: ${{gitea.event.head_commit.message}}" && show_hr
@ -312,7 +313,7 @@ runs:
echo "::error::Commit history not found for delta synchronization. Please ensure you have 'fetch-depth: 0' option in checkout action. Please ignore if this is an initial commit or newly created branch." echo "::error::Commit history not found for delta synchronization. Please ensure you have 'fetch-depth: 0' option in checkout action. Please ignore if this is an initial commit or newly created branch."
exit 1 exit 1
fi fi
domain="code.klank.school"
echo "Previous Revision: https://${domain}/${{gitea.repository}}/commit/${git_previous_commit}" && show_hr echo "Previous Revision: https://${domain}/${{gitea.repository}}/commit/${git_previous_commit}" && show_hr
# ${proxy_cmd} lftp -c "set log:enabled/xfer false; get -O ~ \"${remote_path_slash}.deploy-revision\"; exit 0" # ${proxy_cmd} lftp -c "set log:enabled/xfer false; get -O ~ \"${remote_path_slash}.deploy-revision\"; exit 0"