From 8f1212bc9e38af6f9102bb4b13951d5f61e9a18c Mon Sep 17 00:00:00 2001 From: andy Augustin Date: Mon, 13 Feb 2023 20:37:08 +0100 Subject: [PATCH] Fix/fork wrokflows (#314) * fix: :bug: run of workflows in forked repos (#312) * fix: :bug: run of workflows in forked repos (#312) --- .github/workflows/lint.yml | 6 +++++- .github/workflows/test_pat.yml | 2 +- .github/workflows/test_ssh.yml | 2 +- .github/workflows/test_ssh_gitlab.yml | 2 +- README.md | 6 ++++-- 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 8c65ca27..0a190e54 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,6 +1,10 @@ name: Lint -on: [push] +on: + pull_request: + push: + # manual trigger + workflow_dispatch: jobs: diff --git a/.github/workflows/test_pat.yml b/.github/workflows/test_pat.yml index 7c7d36d3..4cb55b8c 100644 --- a/.github/workflows/test_pat.yml +++ b/.github/workflows/test_pat.yml @@ -1,7 +1,7 @@ name: test-pat on: - pull_request: + # pull_request: push: # manual trigger workflow_dispatch: diff --git a/.github/workflows/test_ssh.yml b/.github/workflows/test_ssh.yml index 776a083b..bb709c23 100644 --- a/.github/workflows/test_ssh.yml +++ b/.github/workflows/test_ssh.yml @@ -1,7 +1,7 @@ name: test-ssh on: - pull_request: + # pull_request: push: # manual trigger workflow_dispatch: diff --git a/.github/workflows/test_ssh_gitlab.yml b/.github/workflows/test_ssh_gitlab.yml index f8d58990..b169d1f4 100644 --- a/.github/workflows/test_ssh_gitlab.yml +++ b/.github/workflows/test_ssh_gitlab.yml @@ -1,7 +1,7 @@ name: test-ssh-gitlab on: - pull_request: + # pull_request: push: # manual trigger workflow_dispatch: diff --git a/README.md b/README.md index 26dfeb38..ad6c9fae 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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.