v3.0.6 #53
Workflow file for this run
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: Build | |
concurrency: | |
group: "${{ github.repository }}${{ github.ref }}-release" | |
on: | |
release: | |
types: | |
- published | |
env: | |
REGISTRY: us-central1-docker.pkg.dev/main-383408/otterize | |
jobs: | |
push-dockerhub: | |
name: Push to Docker Hub | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Login to GCR | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: _json_key_base64 | |
password: ${{ secrets.B64_GCLOUD_SERVICE_ACCOUNT_JSON}} | |
- name: Login to DockerHub | |
uses: docker/login-action@v1 | |
with: | |
username: otterize | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@master | |
with: | |
driver-opts: network=host | |
- name: Push to Docker Hub | |
uses: docker/build-push-action@v2 | |
with: | |
context: .github/workflows | |
file: .github/workflows/release.Dockerfile | |
tags: otterize/credentials-operator:latest,otterize/credentials-operator:${{ github.ref_name }} | |
push: true | |
network: host | |
platforms: linux/amd64,linux/arm64 | |
build-args: | | |
"VERSION=${{ github.ref_name }}" | |
"SOURCE_IMAGE=${{ env.REGISTRY }}/credentials-operator:${{ github.sha }}" | |
commit-latest-build-tag-to-helm-chart: | |
name: Commit Latest Build Tag | |
runs-on: ubuntu-latest | |
needs: push-dockerhub | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
repository: "otterize/helm-charts" | |
token: ${{ secrets.OTTERIZEBOT_GITHUB_TOKEN }} | |
ref: main | |
- name: Update appVersion in chart.yaml | |
uses: mikefarah/yq@master | |
with: | |
cmd: yq -i '.appVersion = "${{ github.ref_name }}"' 'credentials-operator/Chart.yaml' | |
- name: Setup git config | |
run: | | |
git config user.name "otterizebot" | |
git config user.email "otterizebot@users.noreply.github.com" | |
- name: Commit | |
run: | | |
git add --all | |
git commit -m "Setting latest tag in credentials-operator helm chart repo to ${{ github.ref_name }}" | |
git push origin HEAD | |