Last active
June 30, 2023 17:59
-
-
Save dexhorthy/078faf21746b3561590c3692ebbebd2a to your computer and use it in GitHub Desktop.
github-actions-promote-to-unstable-onmain
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
name: App Release | |
on: | |
push: | |
branches: [main] | |
paths: | |
- 'manifests/**/*' | |
- 'templates/**/*' | |
- Chart.yaml | |
- '.github/workflows/release.yml' | |
jobs: | |
create-release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Define App Version | |
shell: bash | |
run: echo "APP_VERSION=0.0.1-${GITHUB_REF_NAME//[^a-zA-Z0-9]/}.${GITHUB_RUN_ID}${GITHUB_RUN_ATTEMPT}" >> $GITHUB_ENV | |
- name: Package Helm Chart for Replicated | |
id: package-helm-chart | |
run: | | |
mkdir -p manifests | |
helm package . -u -d manifests \ | |
--app-version=0.0.1-${{ github.ref_name }} \ | |
--version=${{ env.APP_VERSION }} | |
- name: Create Release | |
uses: docker://replicated/vendor-cli:latest | |
with: | |
args: release create --promote=Unstable --version=${{ env.APP_VERSION }} --yaml-dir=manifests | |
env: | |
REPLICATED_API_TOKEN: ${{ secrets.REPLICATED_API_TOKEN }} | |
REPLICATED_APP: ${{ secrets.REPLICATED_APP }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment