Skip to content

Instantly share code, notes, and snippets.

@dexhorthy
Last active June 30, 2023 17:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dexhorthy/078faf21746b3561590c3692ebbebd2a to your computer and use it in GitHub Desktop.
Save dexhorthy/078faf21746b3561590c3692ebbebd2a to your computer and use it in GitHub Desktop.
github-actions-promote-to-unstable-onmain
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