Skip to content

Commit

Permalink
Fix the workflow publishes quickstart manifests (#5266)
Browse files Browse the repository at this point in the history
* Add pull-requests permission to the workflow

Signed-off-by: Shinnosuke Sawada-Dazai <shin@warashi.dev>

* Set the base branch to the default branch of the repository

Signed-off-by: Shinnosuke Sawada-Dazai <shin@warashi.dev>

* Use `github.ref_name` to determine the version of manifests

Signed-off-by: Shinnosuke Sawada-Dazai <shin@warashi.dev>

* Checkout master branch to make PR to master branch

Signed-off-by: Shinnosuke Sawada-Dazai <shin@warashi.dev>

---------

Signed-off-by: Shinnosuke Sawada-Dazai <shin@warashi.dev>
  • Loading branch information
Warashi authored Oct 8, 2024
1 parent 70d793d commit 0e6c745
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/publish_image_chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ jobs:
if: startsWith(github.ref, 'refs/tags/')
permissions:
contents: write
pull-requests: write
steps:
# setup tools and repositories
- name: Install helm
Expand All @@ -162,15 +163,14 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Determine version
run: echo "PIPECD_VERSION=$(git describe --tags --always --abbrev=7)" >> $GITHUB_ENV
ref: master

# Building and publishing quickstart manifests.
# we use `github.ref_name` to get the tag name without the `refs/tags/` prefix.
- name: Build quickstart manifests
run: |
helm template pipecd oci://ghcr.io/pipe-cd/chart/pipecd --version ${{ env.PIPECD_VERSION }} -n pipecd -f quickstart/control-plane-values.yaml > quickstart/manifests/control-plane.yaml
helm template piped oci://ghcr.io/pipe-cd/chart/piped --version ${{ env.PIPECD_VERSION }} -n pipecd --set quickstart.enabled=true --set quickstart.pipedId=\<YOUR_PIPED_ID\> --set quickstart.pipedKeyData=\<YOUR_PIPED_KEY_DATA\> > quickstart/manifests/piped.yaml
helm template pipecd oci://ghcr.io/pipe-cd/chart/pipecd --version ${{ github.ref_name }} -n pipecd -f quickstart/control-plane-values.yaml > quickstart/manifests/control-plane.yaml
helm template piped oci://ghcr.io/pipe-cd/chart/piped --version ${{ github.ref_name }} -n pipecd --set quickstart.enabled=true --set quickstart.pipedId=\<YOUR_PIPED_ID\> --set quickstart.pipedKeyData=\<YOUR_PIPED_KEY_DATA\> > quickstart/manifests/piped.yaml
- name: Publish quickstart manifests
uses: peter-evans/create-pull-request@v6
with:
Expand Down

0 comments on commit 0e6c745

Please sign in to comment.