Skip to content

fix(nimbus): adjust precision of data points in overview popout cards… #5170

fix(nimbus): adjust precision of data points in overview popout cards…

fix(nimbus): adjust precision of data points in overview popout cards… #5170

name: Experimenter -- Build, Tag and Push Container Images to GAR Repository
on:
pull_request:
types: [labeled, unlabeled, synchronize]
push:
branches:
- main
workflow_dispatch: {}
env:
PROJECT_ID: moz-fx-experimenter-prod-6cd5
IMAGE_BASE: us-docker.pkg.dev/moz-fx-experimenter-prod-6cd5/experimenter-prod/experimenter
jobs:
build_and_push:
if: >
github.event_name == 'push' ||
github.event_name == 'workflow_dispatch' ||
(
github.event_name == 'pull_request' &&
contains(github.event.pull_request.labels.*.name, 'pr-preview') &&
github.event.pull_request.head.repo.full_name == github.repository
)
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.sha) || github.ref }}
persist-credentials: false
fetch-tags: true
fetch-depth: 0
- uses: ./.github/actions/check-changed-paths
id: check-paths
with:
paths: "experimenter/"
- uses: ./.github/actions/retry
if: steps.check-paths.outputs.should-run == 'true'
with:
label: Build experimenter prod image
run: |
./scripts/store_git_info.sh
make build_prod
- name: Generate MozCloud Tag
if: steps.check-paths.outputs.should-run == 'true'
id: mozcloud-tag
shell: bash
env:
REF_TYPE: ${{ github.ref_type }}
REF_NAME: ${{ github.ref_name }}
run: |
if [[ "${REF_TYPE}" == "tag" ]]; then
tag="${REF_NAME}"
else
tag="sha-$(git rev-parse --short=9 HEAD)"
fi
echo "Setting IMAGE_TAG=${tag} as output"
echo "image_tag=${tag}" >> "$GITHUB_OUTPUT"
- name: Tag image(s) for GAR
if: steps.check-paths.outputs.should-run == 'true'
id: meta
shell: bash
env:
IMAGE_TAG: ${{ steps.mozcloud-tag.outputs.image_tag }}
run: |
docker tag experimenter:deploy "${IMAGE_BASE}:latest"
docker tag experimenter:deploy "${IMAGE_BASE}:${IMAGE_TAG}"
echo "image_tag=${IMAGE_TAG}" >> "$GITHUB_OUTPUT"
- name: Push to Google Artifact Registry
if: steps.check-paths.outputs.should-run == 'true'
uses: mozilla-it/deploy-actions/docker-push@v4.3.2
with:
image_tags: |-
${{ env.IMAGE_BASE }}:latest
${{ env.IMAGE_BASE }}:${{ steps.meta.outputs.image_tag }}
workload_identity_pool_project_number: ${{ vars.GCPV2_WORKLOAD_IDENTITY_POOL_PROJECT_NUMBER }}
project_id: ${{ env.PROJECT_ID }}