add temporary publish to dockerhub step
This commit is contained in:
@@ -192,6 +192,33 @@ jobs:
|
||||
-f "output[summary]=${IMAGE}" \
|
||||
-f "output[text]=${IMAGE}"
|
||||
|
||||
# TODO remove this when delivering
|
||||
# This will push the temporary docker image to dockerhub
|
||||
push-docker-image-to-dockerhub:
|
||||
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- build-grafana
|
||||
steps:
|
||||
- uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53
|
||||
with:
|
||||
name: grafana-docker-tar-gz
|
||||
path: .
|
||||
- uses: grafana/shared-workflows/actions/dockerhub-login@dockerhub-login/v1.0.2
|
||||
- name: Load & Push Docker image
|
||||
env:
|
||||
BUILD_ID: ${{ github.run_id }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
LOADED_IMAGE_NAME=$(docker load -i grafana.docker.tar.gz | sed 's/Loaded image: //g')
|
||||
VERSION=$(echo "${LOADED_IMAGE_NAME}" | cut -d ':' -f 2 | cut -d '-' -f 1)
|
||||
DOCKER_IMAGE="grafana/grafana:12.4.0-react19"
|
||||
docker tag "${LOADED_IMAGE_NAME}" "${DOCKER_IMAGE}"
|
||||
docker push "${DOCKER_IMAGE}"
|
||||
|
||||
run-e2e-tests:
|
||||
needs:
|
||||
- build-grafana
|
||||
|
||||
Reference in New Issue
Block a user