Merge pull request #50 from aa-replicated/demo/tier4 #76
This file contains hidden or 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: Release | |
| on: | |
| push: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| packages: write | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to ghcr.io | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set version | |
| run: echo "VERSION=0.1.${{ github.run_number }}" >> $GITHUB_ENV | |
| - name: Build and push image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| push: true | |
| platforms: linux/amd64 | |
| tags: | | |
| ghcr.io/aa-replicated/gameshelf:${{ env.VERSION }} | |
| ghcr.io/aa-replicated/gameshelf:latest | |
| - name: Package Helm chart | |
| run: | | |
| helm dependency update chart/gameshelf | |
| helm package chart/gameshelf \ | |
| --version ${{ env.VERSION }} \ | |
| --app-version ${{ env.VERSION }} \ | |
| --destination release/ | |
| - name: Copy Replicated configs | |
| run: | | |
| cp .replicated release/ | |
| cp embedded-cluster-config.yaml release/ | |
| sed "s/chartVersion: .*/chartVersion: \"${{ env.VERSION }}\"/" helmchart.yaml > release/helmchart.yaml | |
| cp kots-config.yaml release/ | |
| cp kots-app.yaml release/ | |
| - name: Create Replicated release | |
| id: create-release | |
| uses: replicatedhq/replicated-actions/create-release@v1 | |
| with: | |
| app-slug: gameshelf | |
| api-token: ${{ secrets.REPLICATED_API_TOKEN }} | |
| yaml-dir: release/ | |
| version: ${{ env.VERSION }} | |
| - name: Promote to Unstable | |
| uses: replicatedhq/replicated-actions/promote-release@v1 | |
| with: | |
| app-slug: gameshelf | |
| api-token: ${{ secrets.REPLICATED_API_TOKEN }} | |
| release-sequence: ${{ steps.create-release.outputs.release-sequence }} | |
| release-version: ${{ env.VERSION }} | |
| channel-to: unstable |