Skip to content

Commit

Permalink
Update bert-models-cicd.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
bill-baumgartner committed May 10, 2024
1 parent e4a2db3 commit 383c9f2
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/bert-models-cicd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,53 @@ jobs:




# ----------------------------------------------------------------------------------- #
# ----------------------------------------------------------------------------------- #
# ----------------------------------------------------------------------------------- #
# BUILD/PUSH CAT_SENTENCES CONTAINER IMAGE #
# ----------------------------------------------------------------------------------- #
# ----------------------------------------------------------------------------------- #
# ----------------------------------------------------------------------------------- #

build_push-cat-sentences:
name: "build/push cat-sentences container image"
runs-on: ubuntu-latest
env:
IMAGE_NAME: cat-sentences
DOCKERFILE: cat_sentences.Dockerfile
permissions:
contents: 'read'
id-token: 'write'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- id: 'auth'
uses: 'google-github-actions/auth@v2'
with:
project_id: ${{ secrets.GCE_PROJECT }}
service_account: ${{ secrets.SERVICE_ACCOUNT }}
credentials_json: ${{ secrets.SERVICE_ACCOUNT_KEY }}
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v2'
with:
version: '>= 363.0.0'
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Configure Docker Authentication
run: gcloud --quiet auth configure-docker
- name: Set MODEL_VERSION env
run: echo "MODEL_VERSION=$(grep 'CAT_SENTENCES' MODEL_VERSIONS | cut -f 2 -d '=')" >> $GITHUB_ENV
- name: Build Docker Image
run: docker build --tag "gcr.io/$PROJECT_ID/$IMAGE_NAME:$MODEL_VERSION" -f ${{ env.DOCKERFILE }} .
- name: Publish Docker Image to Google Container Registry
run: docker push "gcr.io/$PROJECT_ID/$IMAGE_NAME:$MODEL_VERSION"



# # # # # ----------------------------------------------------------------------------------- #
# # # # # ----------------------------------------------------------------------------------- #
# # # # # ----------------------------------------------------------------------------------- #
Expand Down

0 comments on commit 383c9f2

Please sign in to comment.