Skip to content

Commit

Permalink
Fix/fork wrokflows (#314)
Browse files Browse the repository at this point in the history
* fix: 🐛 run of workflows in forked repos (#312)

* fix: 🐛 run of workflows in forked repos (#312)
  • Loading branch information
AndreasAugustin committed Feb 13, 2023
1 parent 77bb5aa commit 8f1212b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Lint

on: [push]
on:
pull_request:
push:
# manual trigger
workflow_dispatch:

jobs:

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_pat.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: test-pat

on:
pull_request:
# pull_request:
push:
# manual trigger
workflow_dispatch:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_ssh.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: test-ssh

on:
pull_request:
# pull_request:
push:
# manual trigger
workflow_dispatch:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_ssh_gitlab.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: test-ssh-gitlab

on:
pull_request:
# pull_request:
push:
# manual trigger
workflow_dispatch:
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ This GitHub action will help you to keep track of the template changes.
* Ignore files and folders from syncing using a `.templatesyncignore` file
* many configuration options
* different lifecycle hooks are supported
* different git provider. Default is GitHub, GitLab is also tested. See [.github/workflows/test_ssh_gitlab.yml](.github/workflows/test_ssh_gitlab.yml) for an example.
* different git provider. Default is GitHub, GitLab is also tested.
See [.github/workflows/test_ssh_gitlab.yml](.github/workflows/test_ssh_gitlab.yml) for an example.

## Usage

Expand Down Expand Up @@ -105,7 +106,8 @@ jobs:
You have various options to use ssh keys with GitHub.
An example are [deployment keys][deployment-keys]. For our use case write permissions are not needed.
Within the current repository, where the GitHub action is enabled, add a secret (e.q. `SOURCE_REPO_SSH_PRIVATE_KEY`) with the content of your private SSH key.
Within the current repository, where the GitHub action is enabled, add a secret
(e.q. `SOURCE_REPO_SSH_PRIVATE_KEY`) with the content of your private SSH key.
Make sure that the read permissions of that secret fulfil your use case.
Set the optional `source_repo_ssh_private_key` input parameter.
It is also possible to use a different git provider, e.g. GitLab.
Expand Down

0 comments on commit 8f1212b

Please sign in to comment.