Fixing typo in forgeops.conf logic #8
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: Tag on merge | |
| on: | |
| push: | |
| branches: | |
| - main | |
| env: | |
| REGISTRY: "us-docker.pkg.dev" | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Configure Git | |
| run: | | |
| git config user.name "$GITHUB_ACTOR" | |
| git config user.email "$GITHUB_ACTOR@users.noreply.github.com" | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ vars.REGISTRY_USERNAME }} | |
| password: ${{ secrets.REGISTRY_TOKEN }} | |
| - name: Set tag | |
| id: set_tag | |
| run: | | |
| RELEASE_TAG=$(head -n 1 CHANGELOG.md | awk -F= '{print $2}') | |
| echo "RELEASE_TAG=$RELEASE_TAG" >> $GITHUB_ENV | |
| echo "BUILD_TAG=$RELEASE_TAG-$(date +%H%M)" >> $GITHUB_ENV | |
| - name: Build | |
| id: bake | |
| uses: docker/bake-action@v5 | |
| with: | |
| source: "{{defaultContext}}:docker" | |
| push: true | |
| files: | | |
| ./docker-bake.hcl | |
| - name: Install Helm | |
| uses: azure/setup-helm@v4 | |
| env: | |
| GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
| - name: Get latest release | |
| id: get_latest_release | |
| uses: joutvhu/get-release@v1 | |
| with: | |
| latest: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Start minikube | |
| id: minikube | |
| uses: medyagh/setup-minikube@latest | |
| with: | |
| cpus: 4 | |
| memory: 8000m | |
| addons: storage-provisioner,default-storageclass,ingress | |
| - name: Cluster prereqs | |
| run: | | |
| kubectl apply -f ./cluster/resources/minikube-fast-storage-class.yaml | |
| ./charts/scripts/install-prereqs | |
| - name: Helm deploy latest | |
| run: | | |
| kubectl create namespace identity-platform | |
| helm upgrade identity-platform identity-platform \ | |
| --repo https://ForgeRock.github.io/forgeops/ \ | |
| --version ${{ steps.get_latest_release.outputs.tag_name }} \ | |
| --namespace identity-platform --install | |
| - name: Update helm chart | |
| id: update_helm_chart | |
| run: | | |
| sed -ie "s/^version:.*/version:\ ${{ env.RELEASE_TAG }}/" charts/identity-platform/Chart.yaml | |
| sed -ie "s/^appVersion:.*/appVersion:\ ${{ env.RELEASE_TAG }}/" charts/identity-platform/Chart.yaml | |
| sed -ie "s/tag:\ latest/tag:\ \"${{ env.BUILD_TAG }}\"/g" charts/identity-platform/values.yaml | |
| - name: Run chart-releaser | |
| uses: helm/chart-releaser-action@v1.6.0 | |
| env: | |
| CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
| with: | |
| charts_dir: charts | |
| pages_branch: gh-pages | |
| - name: Helm deploy upgrade | |
| run: | | |
| helm upgrade identity-platform identity-platform \ | |
| --repo https://ForgeRock.github.io/forgeops/ \ | |
| --version ${{ env.RELEASE_TAG }} \ | |
| --namespace identity-platform --install | |
| - name: Create tag | |
| id: tag_version | |
| uses: mathieudutour/github-tag-action@v6.0 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| custom_tag: ${{ env.RELEASE_TAG }} | |
| tag_prefix: "" | |
| - name: Touch CHANGELOG.md | |
| run: | | |
| touch CHANGELOG.md | |
| - name: Create GitHub release | |
| id: create_github_release | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| tag: ${{ steps.tag_version.outputs.new_tag }} | |
| name: ${{ steps.tag_version.outputs.new_tag }} | |
| bodyFile: CHANGELOG.md | |
| generateReleaseNotes: true | |
| makeLatest: true |