chore(deps): update flanksource/base-image docker tag to v0.8.1 #1482
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: Create Release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: {} # start with no permission | |
| jobs: | |
| create-release: | |
| permissions: | |
| contents: write | |
| issues: write | |
| pull-requests: write | |
| uses: flanksource/action-workflows/.github/workflows/create-release.yml@6e3308211f3e1694e187ea2057c24978e5a01c2f | |
| secrets: | |
| token: ${{ secrets.FLANKBOT }} | |
| binary: | |
| runs-on: ubuntu-latest | |
| needs: create-release | |
| if: needs.create-release.outputs.published == 'true' | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0 | |
| with: | |
| egress-policy: audit | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: "16" | |
| - name: Install Go | |
| uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v5 | |
| with: | |
| go-version: v1.26.x | |
| - uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v4 | |
| with: | |
| path: | | |
| ~/go/pkg/mod | |
| ~/.cache/go-build | |
| .bin | |
| key: cache-${{ hashFiles('**/go.sum') }}-${{ hashFiles('.bin/*') }} | |
| restore-keys: | | |
| cache- | |
| - run: make release | |
| env: | |
| VERSION: v${{ needs.create-release.outputs.version }} | |
| - name: Upload binaries to release | |
| uses: svenstaro/upload-release-action@29e53e917877a24fad85510ded594ab3c9ca12de # 2.11.5 | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| file: ./.release/* | |
| tag: v${{ needs.create-release.outputs.version }} | |
| overwrite: true | |
| file_glob: true | |
| docker: | |
| needs: create-release | |
| if: needs.create-release.outputs.published == 'true' | |
| permissions: | |
| contents: read | |
| id-token: write | |
| packages: write | |
| uses: flanksource/action-workflows/.github/workflows/publish-docker-image.yml@df2df1bb53811b598f44b2561c28172ffc36fc88 | |
| with: | |
| dockerfile: build/Dockerfile | |
| platforms: linux/amd64,linux/arm64 | |
| image_tags: | | |
| docker.io/flanksource/config-db:v${{ needs.create-release.outputs.version }} | |
| docker.io/flanksource/config-db:latest | |
| public.ecr.aws/k4y9r6y5/config-db:v${{ needs.create-release.outputs.version }} | |
| login_to_ecr: true | |
| ecr_registry_type: public | |
| secrets: | |
| docker_username: ${{ secrets.DOCKER_USERNAME }} | |
| docker_password: ${{ secrets.DOCKER_PASSWORD }} | |
| aws_access_key_id: ${{ secrets.ECR_AWS_ACCESS_KEY }} | |
| aws_secret_access_key: ${{ secrets.ECR_AWS_SECRET_ACCESS_KEY }} | |
| helm: | |
| runs-on: ubuntu-latest | |
| needs: [create-release, docker] | |
| if: needs.create-release.outputs.published == 'true' | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Set version | |
| # Always use git tags as semantic release can fail due to rate limit | |
| run: | | |
| git fetch --prune --unshallow | |
| echo "RELEASE_VERSION=$(git describe --abbrev=0 --tags | sed -e 's/^v//')" >> $GITHUB_ENV | |
| - name: Update chart version | |
| uses: mikefarah/yq@751d8ad57b84f1794661bc70c0afb92a22ad7b3c # v4.45.1 | |
| with: | |
| cmd: yq -i e '.version = "${{ env.RELEASE_VERSION }}"' chart/Chart.yaml | |
| - name: Update app version | |
| uses: mikefarah/yq@751d8ad57b84f1794661bc70c0afb92a22ad7b3c # v4.45.1 | |
| with: | |
| cmd: yq -i e '.appVersion = "${{ env.RELEASE_VERSION }}"' chart/values.yaml | |
| - name: Update image tags | |
| uses: mikefarah/yq@751d8ad57b84f1794661bc70c0afb92a22ad7b3c # v4.45.1 | |
| with: | |
| cmd: yq -i e '.image.tag = "v${{ env.RELEASE_VERSION }}"' chart/values.yaml | |
| - name: Set up Helm | |
| uses: azure/setup-helm@dda3372f752e03dde6b3237bc9431cdc2f7a02a2 # v5.0.0 | |
| with: | |
| version: v3.8.0 | |
| - name: Package Helm chart | |
| run: | | |
| helm package ./chart | |
| - name: Upload helm chart artifact | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: helm-chart | |
| path: config-db-*.tgz | |
| push-helm-chart: | |
| needs: [create-release, helm] | |
| if: needs.create-release.outputs.published == 'true' | |
| permissions: | |
| actions: read | |
| contents: read | |
| uses: flanksource/action-workflows/.github/workflows/push-helm-chart.yml@4b41aaf6cf7727789c0d21cd0bc262e850ba543f # main | |
| with: | |
| filename_regex: "config-db-*.tgz" | |
| version: ${{ needs.create-release.outputs.version }} | |
| pr_title: "Release ${{ needs.create-release.outputs.version }} of flanksource/config-db" | |
| secrets: | |
| token: ${{ secrets.FLANKBOT }} |