M #-: Prepares for release v0.1.7 (#48) #9
Workflow file for this run
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: | |
| tags: ["v*.*.*"] | |
| permissions: | |
| contents: write | |
| packages: write | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Login to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: "${{ github.actor }}" | |
| password: "${{ secrets.GITHUB_TOKEN }}" | |
| - name: Build and push images | |
| run: make docker-release "CLOSEST_TAG:=$GITHUB_REF_NAME" BUILDX_NO_DEFAULT_ATTESTATIONS=1 | |
| - name: Generate manifests and charts | |
| run: make release "CLOSEST_TAG:=$GITHUB_REF_NAME" | |
| - name: Checkout repository (gh-pages) | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: gh-pages | |
| path: ./gh-pages/ | |
| - name: Deploy charts | |
| run: | | |
| shopt -s failglob | |
| cp -f ./_charts/$GITHUB_REF_NAME/capone-*-${GITHUB_REF_NAME:1}.tgz ./gh-pages/charts/ | |
| - name: Re-index charts | |
| working-directory: ./gh-pages/charts/ | |
| run: | | |
| ../../bin/helm repo index ./ --url https://opennebula.github.io/cluster-api-provider-opennebula/charts/ | |
| - name: Push gh-pages | |
| working-directory: ./gh-pages/charts/ | |
| run: | | |
| shopt -s failglob | |
| git add ./index.yaml ./capone-*-${GITHUB_REF_NAME:1}.tgz | |
| git config user.name "$GITHUB_ACTOR" | |
| git config user.email "$GITHUB_ACTOR@users.noreply.github.com" | |
| git commit -m "${GITHUB_REF_NAME:1}" | |
| git push | |
| - name: Create release | |
| env: { GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" } | |
| run: | | |
| shopt -s failglob | |
| gh release create "$GITHUB_REF_NAME" --generate-notes ./_releases/$GITHUB_REF_NAME/*.yaml |