Skip to content

Commit

Permalink
update deploy app build and push step
Browse files Browse the repository at this point in the history
  • Loading branch information
yuenmichelle1 committed Dec 4, 2023
1 parent 02b2a27 commit a4810b9
Showing 1 changed file with 32 additions and 7 deletions.
39 changes: 32 additions & 7 deletions .github/workflows/deploy_app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,38 @@ on:

jobs:
build_and_push_image:
name: Build and Push Image
uses: zooniverse/ci-cd/.github/workflows/build_and_push_image.yaml@main
with:
repo_name: camera-traps-api
commit_id: ${{ github.sha }}
file: ./api/batch_processing/api_core/Dockerfile
latest: true
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
with:
repository: zooniverse/camera-traps-api
ref: zooniverse-deployment

- name: Login to GitHub Container Registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Docker Buildx
uses: docker/[email protected]

- name: Create commit_id.txt
run: echo ${{ github.sha }} > commit_id.txt

- name: Build and push
uses: docker/[email protected]
with:
context: .
file: ./api/batch_processing/api_core/Dockerfile
push: true
tags: |
ghcr.io/zooniverse/camera-traps-api:latest
ghcr.io/zooniverse/camera-traps-api:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max

deploy_app:
runs-on: ubuntu-latest
Expand Down

0 comments on commit a4810b9

Please sign in to comment.