Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to release to a different repository #195

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

prsnca
Copy link

@prsnca prsnca commented May 7, 2024

Adds support for the case mentioned in this issue - #194

Thanks!

@cpanato
Copy link
Member

cpanato commented Jan 20, 2025

@prsnca do you have an example workflow run for this case?

@prsnca
Copy link
Author

prsnca commented Jan 20, 2025

@cpanato, I have been using my fork (https://github.com/prsnca/chart-releaser-action) for these purposes.
we have a release workflow (triggered when a new tag is pushed) in a private repository which checks out the public repository (https://github.com/snyk/runtime-sensor) and releases the chart to both.
I can share here the snippets from the workflow:

...
steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Checkout runtime-sensor public repository
        uses: actions/checkout@v4
        with:
          repository: snyk/runtime-sensor
          path: runtime-sensor
          token: "${{ secrets.RUNTIME_SENSOR_GITHUB_TOKEN }}"

      - name: Get Latest Tag
        id: get-tag
        ***
...

      - name: Create tag in public repository
        run: |
          cd ${{ github.workspace }}/runtime-sensor
          echo "RUNTIME_SENSOR_HASH=$(git rev-parse HEAD)" >> $GITHUB_ENV
          git tag ${{ steps.get-tag.outputs.tag }}
          git push --tags --porcelain

      - name: Run chart-releaser for public repo
        uses: prsnca/[email protected]
        with:
          repository: snyk/runtime-sensor
          commit: ${{ env.RUNTIME_SENSOR_HASH }}
        env:
          CR_TOKEN: "${{ secrets.RUNTIME_SENSOR_GITHUB_TOKEN }}"

      - name: Run chart-releaser for own repo
        uses: helm/[email protected]
        env:
          CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
...

README.md Outdated Show resolved Hide resolved
Signed-off-by: Yaron <[email protected]>
@prsnca prsnca force-pushed the feat/allow-different-repo branch from d2346d4 to 9f43f6d Compare January 20, 2025 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants