Skip to content

Commit

Permalink
chore: bump (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
hspitzley-czi authored Aug 13, 2024
1 parent b1a9aa1 commit 5c4af09
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 19 deletions.
30 changes: 15 additions & 15 deletions .github/actions/chart-release/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,36 +54,36 @@ runs:
msg = `${msg} (prerelease)`;
}
return msg;
- name: Merge in main
shell: bash
run: |
git config --global user.email "czihelperbot@chanzuckerberg.com"
git config --global user.name "CZI Argus Helm Publisher Bot"
git pull
git merge origin/main
- name: Patch version
uses: mikefarah/yq@v4
with:
cmd: yq -i '.version = "${{ inputs.version }}"' ${{ inputs.release_name }}/Chart.yaml
- name: Publish charts
shell: bash
run: |
set -ue
set -o pipefail
# the location of the chart package
CHARTS_DIR="${{ inputs.release_name }}"
# location of release to download the chart from
CHART_DOWNLOAD_URL="https://github.com/${{ github.repository }}/raw/${{ steps.branch.outputs.result }}"
git config --global user.email "czihelperbot@chanzuckerberg.com"
git config --global user.name "CZI Argus Helm Publisher Bot"
PACKAGE_DIR="."
echo ------
cat ${PACKAGE_DIR}/index.yaml
echo ------
git pull
git merge origin/main
echo ------
cat ${CHARTS_DIR}/Chart.yaml
cat ${{ inputs.release_name }}/Chart.yaml
echo ------
helm dependency update ${{ inputs.release_name }}
helm package ${CHARTS_DIR} -d ${PACKAGE_DIR}
helm repo index ${PACKAGE_DIR} --url ${CHART_DOWNLOAD_URL} --merge ${PACKAGE_DIR}/index.yaml
helm package ${{ inputs.release_name }} -d ${PACKAGE_DIR}
helm repo index ${PACKAGE_DIR} --url "https://github.com/${{ github.repository }}/raw/${{ steps.branch.outputs.result }}" --merge ${PACKAGE_DIR}/index.yaml
git add -A
git commit -m "chore: publish charts from ${{ github.repository }} ${{ inputs.version }}"
git commit -m "chore: publish ${{ inputs.release_name }} chart version ${{ inputs.version }} from ${{ github.repository }}"
git push
11 changes: 8 additions & 3 deletions .github/workflows/chart-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ on:
types: [published]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
check-chart-released:
Expand Down Expand Up @@ -44,7 +44,12 @@ jobs:
uses: actions/github-script@v7
with:
result-encoding: string
script: return context.ref.replace('refs/tags/', '')
script: |
if (!context.ref.startsWith('refs/tags/${{ needs.check-chart-released.outputs.release_name }}-v')) {
throw new Error(`Failed to parse version from tag: ${context.ref}`);
}
const version = context.ref.replace('refs/tags/${{ needs.check-chart-released.outputs.release_name }}-v', '')
return version
- name: Checkout
uses: actions/checkout@v4
- name: Chart Release
Expand Down
2 changes: 1 addition & 1 deletion stack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -227,4 +227,4 @@ cronJobs:
# tag: "latest"
# command: ["command1", "command2"]
# args: ["arg1", "arg2"]
# bump6
# bump7

0 comments on commit 5c4af09

Please sign in to comment.