Merge pull request #439 from cockroachdb/test-fix #156
This file contains 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: Helm Chart Build | |
on: | |
push: | |
branches: | |
- 'master' | |
- 'cert-manager-feature-branch' | |
tags: | |
- 'v*.*.*' | |
jobs: | |
needs-build: | |
name: is-building-self-signer-utility-required | |
runs-on: ubuntu-latest | |
outputs: | |
tagChange: ${{ steps.changetag.outputs.tagChange }} | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Install yq | |
run: make bin/yq | |
- name: Check Tag Change | |
id: changetag | |
run: | | |
if ./build/self-signer-utility.sh | grep -q "You have changed the tag of selfSigner utility"; then | |
echo ::set-output name=tagChange::true | |
else | |
echo ::set-output name=tagChange::false | |
fi | |
# Post job to build and push the self signer utility whenever any PR gets merged | |
post-build: | |
name: build-self-signer-cert-utility | |
runs-on: ubuntu-latest | |
needs: needs-build | |
if: (needs.needs-build.outputs.tagChange == 'true') | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to GCR | |
uses: docker/login-action@v3 | |
with: | |
registry: gcr.io | |
username: _json_key | |
password: ${{ secrets.GCR_HELM_CHART_SA_JSON }} | |
- name: Push Self-signer | |
run: make build-and-push/self-signer |