Merge pull request #1861 from yiannistri/bump-slsactl #41
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: | |
| workflow_dispatch: | |
| push: | |
| tags: | |
| - "v*" # Push events to matching v*, i.e. v1.0, v20.15.10 | |
| jobs: | |
| build-push-services: | |
| permissions: | |
| actions: read | |
| contents: write | |
| packages: write | |
| id-token: write | |
| strategy: | |
| matrix: | |
| destination: [ghcr, prod] | |
| include: | |
| - destination: ghcr | |
| registry: ghcr.io | |
| org: RANCHER_ORG | |
| image: IMAGE_NAME | |
| username: ${{ github.actor }} | |
| password: GITHUB_TOKEN | |
| secret_registry: false | |
| - destination: prod | |
| registry: PRIME_REGISTRY_ENDPOINT | |
| org: RANCHER_ORG | |
| image: IMAGE_NAME | |
| username: REGISTRY_USERNAME | |
| password: REGISTRY_PASSWORD | |
| secret_registry: true | |
| name: Release | |
| uses: ./.github/workflows/release.yml | |
| with: | |
| password: ${{ matrix.password }} | |
| username: ${{ matrix.username }} | |
| registry: ${{ matrix.registry }} | |
| org: ${{ matrix.org }} | |
| image: ${{ matrix.image }} | |
| tag: ${{ github.ref_name }} | |
| secret_registry: ${{ matrix.secret_registry }} | |
| secrets: inherit | |
| release: | |
| name: Create helm release | |
| needs: [build-push-services] | |
| runs-on: ubuntu-latest | |
| env: | |
| TAG: ${{ github.ref_name }} | |
| ORG: ${{ vars.RANCHER_ORG }} | |
| CONTROLLER_IMG: ${{ vars.IMAGE_NAME }} | |
| RELEASE_DIR: .cr-release-packages | |
| CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
| GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: setupGo | |
| uses: actions/[email protected] | |
| with: | |
| go-version-file: go.mod | |
| - name: Configure Git | |
| run: | | |
| git config user.name "$GITHUB_ACTOR" | |
| git config user.email "[email protected]" | |
| - name: Package operator chart | |
| run: RELEASE_TAG=${GITHUB_REF##*/} CHART_PACKAGE_DIR=${RELEASE_DIR} CONTROLLER_IMG="${{ env.ORG }}/${{ env.CONTROLLER_IMG }}" ORG=${{ env.ORG }} make release | |
| - name: Install chart-releaser | |
| uses: helm/[email protected] | |
| with: | |
| install_only: true | |
| - name: Prepare environment for the chart releaser | |
| run: | | |
| echo "CR_OWNER=$(cut -d '/' -f 1 <<< $GITHUB_REPOSITORY)" >> $GITHUB_ENV | |
| echo "CR_GIT_REPO=$(cut -d '/' -f 2 <<< $GITHUB_REPOSITORY)" >> $GITHUB_ENV | |
| rm -rf .cr-index | |
| mkdir -p .cr-index | |
| - name: Run chart-releaser upload | |
| run: cr upload --skip-existing -c "$(git rev-parse HEAD)" --generate-release-notes --release-name-template "${{ env.TAG }}" --make-release-latest=false | |
| - name: Run chart-releaser index | |
| run: cr index --push --release-name-template "${{ env.TAG }}" |