FE-287 implement copy_from_tdr_to_gcs_hca #3
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 and Publish Latest Images for scripts/general | |
on: | |
pull_request_target: | |
types: | |
- closed | |
branches: | |
- main | |
paths: | |
- scripts/general/** | |
- .github/workflows/build_and_push_docker_gen_main.yaml | |
env: | |
GCP_PROJECT_ID: dsp-fieldeng-dev | |
GCP_REPOSITORY_GENERAL: horsefish | |
GITHUB_SHA: ${{ github.sha }} | |
jobs: | |
build-and-push-dev-images: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to GCP | |
uses: google-github-actions/auth@v1 | |
with: | |
credentials_json: ${{ secrets.BASE64_SAKEY_DSPFIELDENG_GARPUSHER }} | |
- name: Configure Docker to use the Google Artifact Registry | |
run: gcloud auth configure-docker us-east4-docker.pkg.dev | |
- name: Build and Push General Docker Image | |
run: | | |
docker build -t us-east4-docker.pkg.dev/$GCP_PROJECT_ID/$GCP_REPOSITORY_GENERAL/general_python:$GITHUB_SHA -f scripts/general/Dockerfile scripts/general | |
docker push us-east4-docker.pkg.dev/$GCP_PROJECT_ID/$GCP_REPOSITORY_GENERAL/general_python:$GITHUB_SHA | |
- name: Set image tag to 'latest' | |
run: | | |
docker tag us-east4-docker.pkg.dev/$GCP_PROJECT_ID/$GCP_REPOSITORY_GENERAL/general_python:$GITHUB_SHA us-east4-docker.pkg.dev/$GCP_PROJECT_ID/$GCP_REPOSITORY_GENERAL/general_python:latest | |
docker push us-east4-docker.pkg.dev/$GCP_PROJECT_ID/$GCP_REPOSITORY_GENERAL/general_python:latest |