Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(operator): Publish images on docker hub upon release #14786

Merged
merged 1 commit into from
Nov 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion .github/workflows/operator-release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ jobs:
outputs:
release_created: ${{ steps.release.outputs.operator--release_created }}
release_name: ${{ steps.release.outputs.operator--tag_name }}
release_major: ${{ steps.release.outputs.operator--major }}
release_minor: ${{ steps.release.outputs.operator--minor }}
release_patch: ${{ steps.release.outputs.operator--patch }}
steps:
- id: "get_github_app_token"
name: Get GitHub App Token
Expand Down Expand Up @@ -53,4 +56,27 @@ jobs:
GH_TOKEN: ${{ steps.get_github_app_token.outputs.token }}
working-directory: "release"
run: |
gh release edit "${{ needs.releasePlease.outputs.release_name }}" --draft=false --latest=false
gh release edit "${{ needs.releasePlease.outputs.release_name }}" --draft=false --latest=false
publishImages:
env:
BUILD_TIMEOUT: 60
IMAGE_PREFIX: "grafana"
needs:
- "publishRelease"
runs-on: ubuntu-latest
steps:
JoaoBraveCoding marked this conversation as resolved.
Show resolved Hide resolved
- name: "Set up QEMU"
uses: "docker/setup-qemu-action@v3"
- name: "Set up docker buildx"
uses: "docker/setup-buildx-action@v3"
- name: "Login to DockerHub (from vault)"
uses: "grafana/shared-workflows/actions/dockerhub-login@main"
- name: "Build and push"
timeout-minutes: "${{ env.BUILD_TIMEOUT }}"
uses: "docker/build-push-action@v6"
with:
context: "operator"
file: "Dockerfile"
platforms: "linux/amd64,linux/arm64,linux/arm"
push: true
tags: "${{ env.IMAGE_PREFIX }}/loki-operator:${{ steps.releasePlease.outputs.release_major }}.${{ steps.releasePlease.outputs.release_minor }}.${{ steps.releasePlease.outputs.release_patch }}"
Loading