forked from freelawproject/courtlistener
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (43 loc) · 1.15 KB
/
docker-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Automate build and deploy
on:
push:
branches: ["**"]
env:
AWS_REGION: us-west-2
EKS_CLUSTER_NAME: courtlistener
EKS_NAMESPACE: court-listener
jobs:
build:
runs-on: ubuntu-latest
outputs:
imageid: ${{ steps.build_push.imageid }}
steps:
- uses: actions/checkout@v4
- name: Set up docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and Push
id: build_push
uses: docker/build-push-action@v4
with:
context: .
file: docker/django/Dockerfile
push: true
tags: |
cweider2/courtlistener:latest
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Placeholder
run: echo "imageid=${{ steps.build_push.imageid }}"
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- name: Placeholder
env:
IMAGEID: ${{needs.build.outputs.imageid}}
run: echo "imageid=$IMAGEID"