From 23a7d522162d5bb1cb97ae29c37504a84d72a068 Mon Sep 17 00:00:00 2001 From: Andy Augustin Date: Mon, 11 Mar 2024 20:56:50 +0100 Subject: [PATCH 01/17] chore: :bricks: use composite instead of docker --- action.yml | 57 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 33 insertions(+), 24 deletions(-) diff --git a/action.yml b/action.yml index 3bb3e6f2..924ca746 100644 --- a/action.yml +++ b/action.yml @@ -59,28 +59,37 @@ inputs: description: "[optional] set the pull parameters for the remote repository" gpg_private_key: description: "[optional] set the gpg private key if you want to sign your commits" +outputs: + pr_branch: + description: "The name of the PR branch" + value: ${{ steps.sync.outputs.random-number }} runs: - using: "docker" - image: "src/Dockerfile" - env: - GITHUB_TOKEN: ${{ inputs.github_token }} - SOURCE_REPO_PATH: ${{ inputs.source_repo_path }} - UPSTREAM_BRANCH: ${{ inputs.upstream_branch }} - SSH_PRIVATE_KEY_SRC: ${{ inputs.source_repo_ssh_private_key }} - PR_BRANCH_NAME_PREFIX: ${{ inputs.pr_branch_name_prefix }} - PR_TITLE: ${{ inputs.pr_title }} - PR_BODY: ${{ inputs.pr_body }} - PR_LABELS: ${{ inputs.pr_labels }} - PR_REVIEWERS: ${{ inputs.pr_reviewers }} - PR_COMMIT_MSG: ${{ inputs.pr_commit_msg }} - HOSTNAME: ${{ inputs.hostname }} - IS_DRY_RUN: ${{ inputs.is_dry_run }} - IS_ALLOW_HOOKS: ${{ inputs.is_allow_hooks }} - HOOKS: ${{ inputs.hooks }} - IS_PR_CLEANUP: ${{ inputs.is_pr_cleanup}} - IS_NOT_SOURCE_GITHUB: ${{ inputs.is_not_source_github }} - IS_FORCE_DELETION: ${{ inputs.is_force_deletion }} - GIT_USER_NAME: ${{ inputs.git_user_name }} - GIT_USER_EMAIL: ${{ inputs.git_user_email }} - GIT_REMOTE_PULL_PARAMS: ${{ inputs.git_remote_pull_params }} - GPG_PRIVATE_KEY: ${{ inputs.gpg_private_key }} + using: "composite" + # image: "src/Dockerfile" + steps: + - name: github sync + run: src/entrypoint.sh + shell: bash + id: sync + env: + GITHUB_TOKEN: ${{ inputs.github_token }} + SOURCE_REPO_PATH: ${{ inputs.source_repo_path }} + UPSTREAM_BRANCH: ${{ inputs.upstream_branch }} + SSH_PRIVATE_KEY_SRC: ${{ inputs.source_repo_ssh_private_key }} + PR_BRANCH_NAME_PREFIX: ${{ inputs.pr_branch_name_prefix }} + PR_TITLE: ${{ inputs.pr_title }} + PR_BODY: ${{ inputs.pr_body }} + PR_LABELS: ${{ inputs.pr_labels }} + PR_REVIEWERS: ${{ inputs.pr_reviewers }} + PR_COMMIT_MSG: ${{ inputs.pr_commit_msg }} + HOSTNAME: ${{ inputs.hostname }} + IS_DRY_RUN: ${{ inputs.is_dry_run }} + IS_ALLOW_HOOKS: ${{ inputs.is_allow_hooks }} + HOOKS: ${{ inputs.hooks }} + IS_PR_CLEANUP: ${{ inputs.is_pr_cleanup}} + IS_NOT_SOURCE_GITHUB: ${{ inputs.is_not_source_github }} + IS_FORCE_DELETION: ${{ inputs.is_force_deletion }} + GIT_USER_NAME: ${{ inputs.git_user_name }} + GIT_USER_EMAIL: ${{ inputs.git_user_email }} + GIT_REMOTE_PULL_PARAMS: ${{ inputs.git_remote_pull_params }} + GPG_PRIVATE_KEY: ${{ inputs.gpg_private_key }} From 7a7da7eecc60b60c6b3539fc409f512ced3bc553 Mon Sep 17 00:00:00 2001 From: Andy Augustin Date: Mon, 11 Mar 2024 20:58:41 +0100 Subject: [PATCH 02/17] fix: :bug: make files executable --- src/entrypoint.sh | 0 src/gpg_no_tty.sh | 0 src/sync_template.sh | 0 src/test-config.yaml | 0 4 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 src/entrypoint.sh mode change 100644 => 100755 src/gpg_no_tty.sh mode change 100644 => 100755 src/sync_template.sh mode change 100644 => 100755 src/test-config.yaml diff --git a/src/entrypoint.sh b/src/entrypoint.sh old mode 100644 new mode 100755 diff --git a/src/gpg_no_tty.sh b/src/gpg_no_tty.sh old mode 100644 new mode 100755 diff --git a/src/sync_template.sh b/src/sync_template.sh old mode 100644 new mode 100755 diff --git a/src/test-config.yaml b/src/test-config.yaml old mode 100644 new mode 100755 From 1d76627ef41a89e57d0f679e5e9ded183ed7be9a Mon Sep 17 00:00:00 2001 From: Andy Augustin Date: Mon, 11 Mar 2024 21:00:55 +0100 Subject: [PATCH 03/17] fix: :bug: --- action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 924ca746..3fedb469 100644 --- a/action.yml +++ b/action.yml @@ -68,7 +68,8 @@ runs: # image: "src/Dockerfile" steps: - name: github sync - run: src/entrypoint.sh + run: entrypoint.sh + working-directory: src/ shell: bash id: sync env: From 4f1273521ba37355a79fb947b8115c6f74abd9e4 Mon Sep 17 00:00:00 2001 From: Andy Augustin Date: Mon, 11 Mar 2024 21:01:59 +0100 Subject: [PATCH 04/17] fix: :bug: --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 3fedb469..f472dc30 100644 --- a/action.yml +++ b/action.yml @@ -68,7 +68,7 @@ runs: # image: "src/Dockerfile" steps: - name: github sync - run: entrypoint.sh + run: ./entrypoint.sh working-directory: src/ shell: bash id: sync From b39978839dde9e000970ca75ebccbf2a2e174bf5 Mon Sep 17 00:00:00 2001 From: Andy Augustin Date: Mon, 11 Mar 2024 21:14:54 +0100 Subject: [PATCH 05/17] fix: :bug: --- src/entrypoint.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/entrypoint.sh b/src/entrypoint.sh index 1fedf364..ae1159ad 100755 --- a/src/entrypoint.sh +++ b/src/entrypoint.sh @@ -109,9 +109,9 @@ function gpg_setup() { for fpr in $(gpg --list-key --with-colons "${git_user_email}" | awk -F: '/fpr:/ {print $10}' | sort -u); do echo -e "5\ny\n" | gpg --no-tty --command-fd 0 --expert --edit-key "$fpr" trust; done KEY_ID="$(gpg --list-secret-key --with-colons "${git_user_email}" | awk -F: '/sec:/ {print $5}')" - git config --global user.signingkey "${KEY_ID}" - git config --global commit.gpgsign true - git config --global gpg.program /bin/gpg_no_tty.sh + git config user.signingkey "${KEY_ID}" + git config commit.gpgsign true + git config gpg.program gpg_no_tty.sh info "done prepare gpg" echo "::endgroup::" @@ -133,10 +133,10 @@ function git_init() { local git_user_name=$2 local source_repo_hostname=$3 - git config --global user.email "${git_user_email}" - git config --global user.name "${git_user_name}" - git config --global pull.rebase false - git config --global --add safe.directory /github/workspace + git config user.email "${git_user_email}" + git config user.name "${git_user_name}" + git config pull.rebase false + git config --add safe.directory /github/workspace # TODO(anau) think about git lfs git lfs install From f1cc39eece41f4d48e2055f297f72b1c77a086c7 Mon Sep 17 00:00:00 2001 From: Andy Augustin Date: Mon, 11 Mar 2024 21:18:27 +0100 Subject: [PATCH 06/17] fix: :bug: --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index f447c212..9ded77d1 100644 --- a/action.yml +++ b/action.yml @@ -64,7 +64,7 @@ inputs: outputs: pr_branch: description: "The name of the PR branch" - value: ${{ steps.sync.outputs.random-number }} + value: ${{ steps.sync.outputs.pr_branch }} runs: using: "composite" # image: "src/Dockerfile" From 4ef282ed95443b74e02c259dfed6de946a2de083 Mon Sep 17 00:00:00 2001 From: Andy Augustin Date: Mon, 11 Mar 2024 21:32:06 +0100 Subject: [PATCH 07/17] feat: :sparkles: git lfs now with flag --- README.md | 1 + action.yml | 4 ++++ src/entrypoint.sh | 7 +++++-- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cf438697..b48ad4dc 100644 --- a/README.md +++ b/README.md @@ -244,6 +244,7 @@ jobs: | pr_reviewers | `[optional]` comma separated list of pull request reviewers. | `false` | | | pr_commit_msg | `[optional]` commit message in the created pull request | `false` | `chore(template): merge template changes :up:` | | hostname | `[optional]` the hostname of the repository | `false` | `github.com` | +| is_git_lfs | `[optional]` set to `true` if you want to enalbe git lfs | `false` | `false` | | is_dry_run | `[optional]` set to `true` if you do not want to push the changes and not want to create a PR | `false` | | | is_allow_hooks | `[optional]` set to `true` if you want to enable lifecycle hooks. Use this with caution! | `false` | `false` | | hooks | `[optional]` please check the lifecycle hooks section below | `false` | | diff --git a/action.yml b/action.yml index 9ded77d1..5bd71671 100644 --- a/action.yml +++ b/action.yml @@ -51,6 +51,9 @@ inputs: is_force_deletion: description: "[optional] set to true if you want to force delete files which are deleted within the source repository even if they contain changes" default: "false" + is_git_lfs: + description: "[optional] set to true if you want to enable git lfs" + default: "false" git_user_name: description: "[optional] set the committer git user.name for the merge commit" git_user_email: @@ -89,6 +92,7 @@ runs: IS_DRY_RUN: ${{ inputs.is_dry_run }} IS_ALLOW_HOOKS: ${{ inputs.is_allow_hooks }} HOOKS: ${{ inputs.hooks }} + IS_GIT_LFS: ${{ inputs.is_git_lfs }} IS_PR_CLEANUP: ${{ inputs.is_pr_cleanup}} IS_NOT_SOURCE_GITHUB: ${{ inputs.is_not_source_github }} IS_FORCE_DELETION: ${{ inputs.is_force_deletion }} diff --git a/src/entrypoint.sh b/src/entrypoint.sh index ae1159ad..e5063ed0 100755 --- a/src/entrypoint.sh +++ b/src/entrypoint.sh @@ -137,8 +137,11 @@ function git_init() { git config user.name "${git_user_name}" git config pull.rebase false git config --add safe.directory /github/workspace - # TODO(anau) think about git lfs - git lfs install + + if [[ "${IS_GIT_LFS}" == 'true' ]]; then + info "enable git lfs." + git lfs install + fi if [[ "${IS_NOT_SOURCE_GITHUB}" == 'true' ]]; then info "the source repository is not located within GitHub." From d9aa01614873512c1163c924bdc91d5f80c82f3c Mon Sep 17 00:00:00 2001 From: Andy Augustin Date: Mon, 11 Mar 2024 21:42:50 +0100 Subject: [PATCH 08/17] fix: :bug: --- action.yml | 4 ++-- src/entrypoint.sh | 6 +++--- src/sync_template.sh | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/action.yml b/action.yml index 5bd71671..30dcdd1f 100644 --- a/action.yml +++ b/action.yml @@ -73,8 +73,8 @@ runs: # image: "src/Dockerfile" steps: - name: github sync - run: ./entrypoint.sh - working-directory: src/ + run: src/entrypoint.sh + # working-directory: src/ shell: bash id: sync env: diff --git a/src/entrypoint.sh b/src/entrypoint.sh index e5063ed0..8b811384 100755 --- a/src/entrypoint.sh +++ b/src/entrypoint.sh @@ -3,8 +3,8 @@ set -e # set -u # set -x -# shellcheck source=src/sync_common.sh -source sync_common.sh +# shellcheck source=./sync_common.sh +source ./sync_common.sh ########################################### # Precheks @@ -111,7 +111,7 @@ function gpg_setup() { KEY_ID="$(gpg --list-secret-key --with-colons "${git_user_email}" | awk -F: '/sec:/ {print $5}')" git config user.signingkey "${KEY_ID}" git config commit.gpgsign true - git config gpg.program gpg_no_tty.sh + git config gpg.program "$(pwd)/gpg_no_tty.sh" info "done prepare gpg" echo "::endgroup::" diff --git a/src/sync_template.sh b/src/sync_template.sh index e09309d4..1ddabfcd 100755 --- a/src/sync_template.sh +++ b/src/sync_template.sh @@ -4,8 +4,8 @@ set -e # set -u # set -x -# shellcheck source=src/sync_template.sh -source sync_common.sh +# shellcheck source=./sync_template.sh +source ./sync_common.sh ############################################ # Prechecks From 26fd149ac7483e310aa97c80b3c046824fc4078d Mon Sep 17 00:00:00 2001 From: Andy Augustin Date: Mon, 11 Mar 2024 21:44:12 +0100 Subject: [PATCH 09/17] fix: :bug: --- src/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/entrypoint.sh b/src/entrypoint.sh index 8b811384..85c31ee8 100755 --- a/src/entrypoint.sh +++ b/src/entrypoint.sh @@ -4,7 +4,7 @@ set -e # set -x # shellcheck source=./sync_common.sh -source ./sync_common.sh +source "$(pwd)/sync_common.sh" ########################################### # Precheks From 308581818d82a1016a07595a75564d6bc014c6f2 Mon Sep 17 00:00:00 2001 From: Andy Augustin Date: Mon, 11 Mar 2024 21:46:24 +0100 Subject: [PATCH 10/17] fix: :bug: --- src/entrypoint.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/entrypoint.sh b/src/entrypoint.sh index 85c31ee8..dca85e7b 100755 --- a/src/entrypoint.sh +++ b/src/entrypoint.sh @@ -3,8 +3,10 @@ set -e # set -u # set -x +SCRIPT_DIR="$(dirname "$(readlink -f "$0")")" + # shellcheck source=./sync_common.sh -source "$(pwd)/sync_common.sh" +source "${SCRIPT_DIR}/src/sync_common.sh" ########################################### # Precheks From 16730b2dec7f883a0320648e960dfb80eef40060 Mon Sep 17 00:00:00 2001 From: Andy Augustin Date: Mon, 11 Mar 2024 21:47:17 +0100 Subject: [PATCH 11/17] fix: :bug: --- src/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/entrypoint.sh b/src/entrypoint.sh index dca85e7b..e7d1b85b 100755 --- a/src/entrypoint.sh +++ b/src/entrypoint.sh @@ -6,7 +6,7 @@ set -e SCRIPT_DIR="$(dirname "$(readlink -f "$0")")" # shellcheck source=./sync_common.sh -source "${SCRIPT_DIR}/src/sync_common.sh" +source "${SCRIPT_DIR}/sync_common.sh" ########################################### # Precheks From 35220621d2546faf75097e549ee56448a6827813 Mon Sep 17 00:00:00 2001 From: Andy Augustin Date: Mon, 11 Mar 2024 21:50:08 +0100 Subject: [PATCH 12/17] fix: :bug: --- src/entrypoint.sh | 4 ++-- src/sync_template.sh | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/entrypoint.sh b/src/entrypoint.sh index e7d1b85b..a16b79de 100755 --- a/src/entrypoint.sh +++ b/src/entrypoint.sh @@ -113,7 +113,7 @@ function gpg_setup() { KEY_ID="$(gpg --list-secret-key --with-colons "${git_user_email}" | awk -F: '/sec:/ {print $5}')" git config user.signingkey "${KEY_ID}" git config commit.gpgsign true - git config gpg.program "$(pwd)/gpg_no_tty.sh" + git config gpg.program "${SCRIPT_DIR}/gpg_no_tty.sh" info "done prepare gpg" echo "::endgroup::" @@ -176,4 +176,4 @@ if [[ -n "${GPG_PRIVATE_KEY}" ]] &>/dev/null; then fi # shellcheck source=src/sync_template.sh -source sync_template.sh +source "${SCRIPT_DIR}/sync_template.sh" diff --git a/src/sync_template.sh b/src/sync_template.sh index 1ddabfcd..d6c0516b 100755 --- a/src/sync_template.sh +++ b/src/sync_template.sh @@ -4,8 +4,10 @@ set -e # set -u # set -x +SCRIPT_DIR="$(dirname "$(readlink -f "$0")")" + # shellcheck source=./sync_template.sh -source ./sync_common.sh +source "${SRIPT_DIR}/sync_common.sh" ############################################ # Prechecks From 22ee6ff30eba8fb8b1def3f5d9361448b6a58829 Mon Sep 17 00:00:00 2001 From: Andy Augustin Date: Mon, 11 Mar 2024 21:51:26 +0100 Subject: [PATCH 13/17] fix: :bug: --- src/sync_template.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sync_template.sh b/src/sync_template.sh index d6c0516b..dd8c456d 100755 --- a/src/sync_template.sh +++ b/src/sync_template.sh @@ -7,7 +7,7 @@ set -e SCRIPT_DIR="$(dirname "$(readlink -f "$0")")" # shellcheck source=./sync_template.sh -source "${SRIPT_DIR}/sync_common.sh" +source "${SCRIPT_DIR}/sync_common.sh" ############################################ # Prechecks From 2268b62c1aaf0c3fec34ff375484b74a83441e96 Mon Sep 17 00:00:00 2001 From: Andy Augustin Date: Mon, 11 Mar 2024 21:56:48 +0100 Subject: [PATCH 14/17] fix: :bug: --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 30dcdd1f..60af3e9a 100644 --- a/action.yml +++ b/action.yml @@ -73,7 +73,7 @@ runs: # image: "src/Dockerfile" steps: - name: github sync - run: src/entrypoint.sh + run: ${{github.action_path}}/src/entrypoint.sh # working-directory: src/ shell: bash id: sync From 9f9cee5c9d98c65608bd394d7491064dc9e2c725 Mon Sep 17 00:00:00 2001 From: Andy Augustin Date: Wed, 13 Mar 2024 22:39:54 +0100 Subject: [PATCH 15/17] fix: :bug: issue with known hosts Signed-off-by: Andy Augustin --- src/entrypoint.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/entrypoint.sh b/src/entrypoint.sh index a16b79de..d0f77f38 100755 --- a/src/entrypoint.sh +++ b/src/entrypoint.sh @@ -22,6 +22,11 @@ if [[ -z "${SOURCE_REPO_PATH}" ]]; then exit 1 fi +if [[ -z "${HOME}" ]]; then + err "Missing env variable HOME."; + exit 1 +fi + ############################################ # Variables ############################################ @@ -147,7 +152,8 @@ function git_init() { if [[ "${IS_NOT_SOURCE_GITHUB}" == 'true' ]]; then info "the source repository is not located within GitHub." - ssh-keyscan -t rsa "${source_repo_hostname}" >> /root/.ssh/known_hosts + mkdir -p "${HOME}"/.ssh + ssh-keyscan -t rsa "${source_repo_hostname}" >> "${HOME}"/.ssh/known_hosts else info "the source repository is located within GitHub." gh auth setup-git --hostname "${source_repo_hostname}" From 979090e8613d7411268e0cac3ac625d98c79ff10 Mon Sep 17 00:00:00 2001 From: Andy Augustin Date: Wed, 13 Mar 2024 22:44:34 +0100 Subject: [PATCH 16/17] style: :rotating_light: fix lint issues Signed-off-by: Andy Augustin --- src/entrypoint.sh | 2 +- src/sync_template.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/entrypoint.sh b/src/entrypoint.sh index d0f77f38..857c5ad7 100755 --- a/src/entrypoint.sh +++ b/src/entrypoint.sh @@ -5,7 +5,7 @@ set -e SCRIPT_DIR="$(dirname "$(readlink -f "$0")")" -# shellcheck source=./sync_common.sh +# shellcheck source=src/sync_common.sh source "${SCRIPT_DIR}/sync_common.sh" ########################################### diff --git a/src/sync_template.sh b/src/sync_template.sh index 15f06bcf..3b2036a5 100755 --- a/src/sync_template.sh +++ b/src/sync_template.sh @@ -6,7 +6,7 @@ set -e SCRIPT_DIR="$(dirname "$(readlink -f "$0")")" -# shellcheck source=./sync_template.sh +# shellcheck source=src/sync_template.sh source "${SCRIPT_DIR}/sync_common.sh" ############################################ From da706d8f2f681aa38dc2df3d733c98b7a2b37d94 Mon Sep 17 00:00:00 2001 From: Andy Augustin Date: Wed, 13 Mar 2024 23:03:12 +0100 Subject: [PATCH 17/17] docs: :memo: document realease notes v2 Signed-off-by: Andy Augustin --- .github/workflows/actions_template_sync.yml | 2 +- README.md | 25 +++++++++++++-------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/.github/workflows/actions_template_sync.yml b/.github/workflows/actions_template_sync.yml index fd69cebe..460248ef 100644 --- a/.github/workflows/actions_template_sync.yml +++ b/.github/workflows/actions_template_sync.yml @@ -19,7 +19,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: actions-template-sync - uses: AndreasAugustin/actions-template-sync@v1 + uses: AndreasAugustin/actions-template-sync@v2 with: github_token: ${{ secrets.GITHUB_TOKEN }} source_repo_path: AndreasAugustin/template diff --git a/README.md b/README.md index cf610182..e703debc 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,7 @@ jobs: # submodules: true - name: actions-template-sync - uses: AndreasAugustin/actions-template-sync@v1 + uses: AndreasAugustin/actions-template-sync@v2 with: source_repo_path: upstream_branch: # defaults to main @@ -133,7 +133,7 @@ jobs: token: ${{ steps.generate_token.outputs.token }} - name: actions-template-sync - uses: AndreasAugustin/actions-template-sync@v1 + uses: AndreasAugustin/actions-template-sync@v2 with: github_token: ${{ steps.generate_token.outputs.token }} source_repo_path: @@ -169,7 +169,7 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} - name: actions-template-sync - uses: AndreasAugustin/actions-template-sync@v1 + uses: AndreasAugustin/actions-template-sync@v2 with: github_token: ${{ secrets.GITHUB_TOKEN }} source_repo_path: ${{ secrets.SOURCE_REPO_PATH }} # , should be within secrets @@ -223,7 +223,7 @@ jobs: token: ${{ secrets.CUSTOM_GITHUB_PAT }} - name: Test action step PAT - uses: AndreasAugustin/actions-template-sync@v1 + uses: AndreasAugustin/actions-template-sync@v2 with: github_token: ${{ secrets.CUSTOM_GITHUB_PAT }} source_repo_path: ${{ secrets.SOURCE_REPO_PATH }} # , should be within secrets @@ -372,7 +372,7 @@ jobs: uses: actions/checkout@v4 - name: actions-template-sync - uses: AndreasAugustin/actions-template-sync@v1 + uses: AndreasAugustin/actions-template-sync@v2 with: github_token: ${{ secrets.GITHUB_TOKEN }} source_repo_path: @@ -408,7 +408,7 @@ E.q. for the installation phase you need to use commands like `apk add --update ```yml - name: Test action step - uses: AndreasAugustin/actions-template-sync@v1 + uses: AndreasAugustin/actions-template-sync@v2 env: MY_VAR: "foo" # possible to define envrionment variables with: @@ -429,7 +429,7 @@ E.q. for the installation phase you need to use commands like `apk add --update ```yml - name: Test action step - uses: AndreasAugustin/actions-template-sync@v1 + uses: AndreasAugustin/actions-template-sync@v2 with: source_repo_path: AndreasAugustin/template.git upstream_branch: main @@ -528,7 +528,7 @@ You need to change the default one e.g. to `git_remote_pull_params: --allow-unre token: ${{ secrets. }} - name: actions-template-sync - uses: AndreasAugustin/actions-template-sync@v1 + uses: AndreasAugustin/actions-template-sync@v2 with: github_token: ${{ secrets.GITHUB_TOKEN }} source_repo_path: @@ -541,8 +541,13 @@ You need to change the default one e.g. to `git_remote_pull_params: --allow-unre Open your project `Settings > Actions > General` and select the checkbox `Allow GitHub Actions to create and approve pull requests` under the `Workflow permissions` section. -## Release Updates +## Release update notes +* `v2` + * `git lfs` is no default anymore. Enable with `is_git_lfs` parameter. + * infrastructure change: now using [composite action][action-composite] instead of [docker action][action-docker] + to be more flexible to combine more actions (file system permissions). + * local `git config` now instead of global `git config --global` in respect to be more flexible in chaining actions. * :warning: starting with version `v1` (`v1.0.0`) the `upstream_branch` variable default is not `main` anymore. It is now set to the remote default branch. * starting with version v0.5.2-draft the `templateversionrc` file is not needed anymore. You can delete that file from the target repositories. @@ -638,6 +643,8 @@ specification. Contributions of any kind are welcome! [enabling-debug-logging]: https://docs.github.com/en/actions/managing-workflow-runs/enabling-debug-logging [deployment-keys]: https://docs.github.com/en/developers/overview/managing-deploy-keys#deploy-keys [action-triggers]: https://docs.github.com/en/actions/reference/events-that-trigger-workflows +[action-composite]: https://docs.github.com/en/actions/creating-actions/creating-a-composite-action +[action-docker]: https://docs.github.com/en/actions/creating-actions/creating-a-docker-container-action [template]: https://github.com/AndreasAugustin/template [marketplace]: https://github.com/marketplace/actions/actions-template-sync [self-usage]: https://github.com/AndreasAugustin/actions-template-sync/blob/main/.github/workflows/actions_template_sync.yml