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

chore: bump #75

Merged
merged 1 commit into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading