-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
118 additions
and
128 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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: InstallHelm | ||
description: 'Installs helm' | ||
inputs: | ||
version: | ||
description: "Version of Helm to install" | ||
required: true | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: install helm | ||
shell: bash | ||
run: | | ||
TEMPDIR=$(mktemp -d) | ||
curl -fsSL -o "${TEMPDIR}/get_helm.sh" https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | ||
chmod 700 "${TEMPDIR}/get_helm.sh" | ||
"${TEMPDIR}/get_helm.sh" --version ${{ inputs.version }} | ||
- name: install helm-diff | ||
shell: bash | ||
run: | | ||
helm plugin install https://github.com/databus23/helm-diff || true |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,61 +1,57 @@ | ||
name: Release | ||
on: | ||
workflow_run: | ||
workflows: [ReleaseTrigger] | ||
types: [completed] | ||
push: | ||
tags: [ 'v*.*.*' ] | ||
permissions: | ||
id-token: write | ||
pull-requests: write | ||
contents: write | ||
id-token: write # aws-actions/[email protected] | ||
contents: write # marvinpinto/action-automatic-releases@latest | ||
pull-requests: write # name: Create PR | ||
jobs: | ||
release: | ||
if: github.event.workflow_run.conclusion == 'success' && contains(fromJson('["push"]'), github.event.workflow_run.event) | ||
if: github.repository == 'aws/karpenter' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: ./.github/actions/download-artifact | ||
- run: | | ||
tag=$(head -n 1 /tmp/artifacts/metadata.txt) | ||
tag_commit=$(tail -n 1 /tmp/artifacts/metadata.txt) | ||
echo "TAG_COMMIT=$tag_commit" >> $GITHUB_ENV | ||
echo "TAG=$tag" >> $GITHUB_ENV | ||
- name: Checkout the repository out again at the given SHA from the artifact | ||
uses: actions/checkout@v3 | ||
- name: Create GitHub Release | ||
uses: 'marvinpinto/action-automatic-releases@latest' | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ env.TAG_COMMIT }} | ||
repo_token: '${{ secrets.GITHUB_TOKEN }}' | ||
prerelease: false | ||
- id: tag | ||
run: | | ||
TAG="$(git describe --tags --exact-match)" | ||
echo TAG="${TAG}" >> "$GITHUB_OUTPUT" | ||
- uses: ./.github/actions/install-deps | ||
- uses: ./.github/actions/authenticate-aws | ||
- uses: ./.github/actions/authenticate-ghcr | ||
- uses: ./.github/actions/e2e/install-helm | ||
with: | ||
version: v3.12.3 # Pinned to this version since v3.13.0 has issues with pushing to public ECR: https://github.com/helm/helm/issues/12442 | ||
- uses: aws-actions/[email protected] | ||
with: | ||
actor: ${{ github.actor }} | ||
secret: ${{ secrets.GITHUB_TOKEN }} | ||
role-to-assume: 'arn:aws:iam::${{ vars.ECR_ACCOUNT_ID }}:role/${{ vars.ECR_RELEASE_ROLE_NAME }}' | ||
aws-region: ${{ vars.ECR_REGION }} | ||
- run: make release | ||
- run: make docgen | ||
- name: Autogenerate and commit files for PR for major and minor releases only | ||
if: endsWith(env.TAG ,'.0') | ||
run: make prepare-website | ||
- run: make prepare-website | ||
- run: make stable-release-pr | ||
if: env.TAG != 'no tag' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GITHUB_REPO: ${{ github.repository }} | ||
- name: Create PR | ||
if: env.TAG != 'no tag' | ||
if: steps.tag.outputs.TAG != 'no tag' | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
const { repo, owner } = context.repo; | ||
const result = await github.rest.pulls.create({ | ||
title: 'chore: Release ${{ env.TAG }}', | ||
title: 'chore: Release ${{ steps.tag.outputs.TAG }}', | ||
owner, | ||
repo, | ||
head: 'release-${{ env.TAG }}', | ||
head: 'release-${{ steps.tag.outputs.TAG }}', | ||
base: 'main', | ||
body: [ | ||
'Stable Release Changes for ${{ env.TAG }}.', | ||
'Stable Release Changes for ${{ steps.tag.outputs.TAG }}.', | ||
'Please disregard this PR if it is for a patch release.', | ||
'Please remove the branch after merging.', | ||
'This PR is generated by [StableRelease](https://github.com/aws/karpenter/actions/workflows/stable-release.yml).' | ||
|
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