AndreasAugustin / actions-template-sync

:octocat: Github action for syncing other repositories (templates) with current repository. Any git provider like GitHub (enterprise), GitLab, Gittea,.. are supported for the source repository

Home Page:https://andreasaugustin.github.io/actions-template-sync/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feat]: hooks - support github actions env variables

AndreasAugustin opened this issue · comments

Describe the feature

With the hooks feature it would be nice to support env variables, e.g.

 steps:
      # To use this repository's private action, you must check out the repository
      - name: Checkout
        uses: actions/checkout@v4
      - name: Test action step
        uses: AndreasAugustin/actions-template-sync@v1
        env:
          MY_VAR: "foo"
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          source_repo_path: AndreasAugustin/template.git
          upstream_branch: main
          is_dry_run: true
          is_allow_hooks: true

Use Case

Sometimes you need to have different variables within different use cases. Would be nice to have the possibility to be able to inject the env variables from action part (e.g. use case for #467 )

Proposed Solution

The env variables are already given to the docker run part but the script execution does not support the injection of the env variables.

Acknowledgements

  • I may be able to implement this feature request