WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Configured vitest similar to jest #60

Configured vitest similar to jest

Configured vitest similar to jest #60

Workflow file for this run

name: Docker Build
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
build:
name: Build Docker Image
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v5
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker image
uses: docker/build-push-action@v5
with:
context: .
file: docker/Dockerfile-mozcloud
build-args: |
GIT_REVISION=${{ github.sha }}
push: false
load: true
tags: pontoon:latest
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Tag image for GAR
id: tag
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: |
# Get the short commit SHA from GitHub context
SHORT_SHA=$(echo "${{ github.sha }}" | cut -c1-7)
# Get branch name from GitHub context
BRANCH_NAME=$(echo "${{ github.ref_name }}")
# Construct GAR image tag
GAR_TAG="us-docker.pkg.dev/${{ vars.GCP_PROJECT_ID }}/pontoon-prod/pontoon:${BRANCH_NAME}-${SHORT_SHA}"
# Tag the built image
docker tag pontoon:latest ${GAR_TAG}
# Output the tag for the push action
echo "image_tags=${GAR_TAG}" >> $GITHUB_OUTPUT
- name: Push Docker image to GAR
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: mozilla-it/deploy-actions/[email protected]
with:
image_tags: ${{ steps.tag.outputs.image_tags }}
project_id: ${{ vars.GCP_PROJECT_ID }}
service_account_name: pontoon-gar-pusher
workload_identity_pool_project_number: ${{ vars.MOZCLOUD_WORKLOAD_IDENTITY_POOL_PROJECT_NUMBER }}