-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automate Helm Chart release on
operator
release (#97)
* linting, automate hc release, drop unneccessary code * only do this on tag * break out unit tests to their own file * add neccessary permissions * grant permissions to unit test job * fix indents * fix whitespacing * remove docker builds on prs * only call tests from release file for now * drop permissions on static-analysis workflow * more linting --------- Co-authored-by: jamie zieziula <[email protected]>
- Loading branch information
1 parent
46cd7e3
commit ae3e932
Showing
8 changed files
with
66 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,12 +28,12 @@ jobs: | |
run: | | ||
# Enable pipefail so git command failures do not result in null versions downstream | ||
set -x | ||
echo "RELEASE_VERSION=$(date +'%Y.%-m.%-d%H%M%S')" >> $GITHUB_OUTPUT | ||
echo "RELEASE_VERSION=$(date +'%Y.%-m.%-d%H%M%S')" >> $GITHUB_ENV | ||
# This ensures that the latest tag we grab will be of the operator image, and not the helm chart | ||
echo "IMAGE_VERSION=$(\ | ||
git ls-remote --tags --refs --sort="v:refname" \ | ||
origin 'v[0-9].[0-9].[0-9]' | tail -n1 | sed 's/.*\///' | sed 's/v//')" >> $GITHUB_OUTPUT | ||
origin 'v[0-9].[0-9].[0-9]' | tail -n1 | sed 's/.*\///' | sed 's/v//')" >> $GITHUB_ENV | ||
- name: Configure Git | ||
run: | | ||
|
@@ -77,11 +77,6 @@ jobs: | |
--sign --key '[email protected]' \ | ||
--keyring $SIGN_KEYRING \ | ||
--passphrase-file $SIGN_PASSPHRASE_FILE | ||
env: | ||
IMAGE_VERSION: ${{ steps.get_version.outputs.IMAGE_VERSION }} | ||
RELEASE_VERSION: ${{ steps.get_version.outputs.RELEASE_VERSION }} | ||
SIGN_KEYRING: ${{ env.SIGN_KEYRING }} | ||
SIGN_PASSPHRASE_FILE: ${{ env.SIGN_PASSPHRASE_FILE }} | ||
- name: Update chart index | ||
run: | | ||
|
@@ -96,8 +91,6 @@ jobs: | |
git add ./index.yaml ./charts/prefect-operator-$RELEASE_VERSION.* ./charts/ | ||
git commit -m "Release $RELEASE_VERSION" | ||
git push origin gh-pages | ||
env: | ||
RELEASE_VERSION: ${{ steps.get_version.outputs.RELEASE_VERSION }} | ||
- name: Create Github Release + Tag | ||
run: | | ||
|
@@ -106,6 +99,4 @@ jobs: | |
--notes "Packaged with prefect-operator version \ | ||
[v$IMAGE_VERSION](https://github.com/PrefectHQ/prefect-operator/releases/tag/v$IMAGE_VERSION)" | ||
env: | ||
IMAGE_VERSION: ${{ steps.get_version.outputs.IMAGE_VERSION }} | ||
GITHUB_TOKEN: ${{ github.token }} | ||
RELEASE_VERSION: ${{ steps.get_version.outputs.RELEASE_VERSION }} | ||
GH_TOKEN: ${{ github.token }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
name: Unit tests | ||
|
||
"on": | ||
workflow_call: {} | ||
|
||
permissions: {} | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: ${{ github.event_name == 'pull_request' }} | ||
|
||
jobs: | ||
unit_tests: | ||
name: Unit tests | ||
runs-on: ubuntu-latest | ||
permissions: | ||
# required to read from the repo | ||
contents: read | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install tool dependencies | ||
uses: jdx/mise-action@v2 | ||
with: | ||
experimental: true # enables the go installation backend | ||
|
||
- name: Build | ||
run: make build | ||
|
||
- name: Test | ||
run: make test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters