-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (37 loc) · 1.24 KB
/
docker-backend.yaml
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
name: 'Build and push backend docker image'
on:
push:
branches:
- 'master'
paths:
- 'backend-shared/**'
- 'fs-shared/**'
- 'repl/**'
- 'server/**'
- 'worker/**'
- 'Backend.Dockerfile'
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Login to Docker Container Registry
uses: docker/login-action@v2
with:
registry: registry.digitalocean.com/fdcr
username: ${{ secrets.CR_TOKEN }}
password: ${{ secrets.CR_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and push
id: docker-build
uses: docker/build-push-action@v3
with:
push: true
tags: registry.digitalocean.com/fdcr/filing-deadlines/backend:latest
file: Backend.Dockerfile
- name: "Print summary"
run: |
echo "# Docker build and push summary" >> $GITHUB_STEP_SUMMARY
echo "Image ID: ${{ steps.docker-build.outputs.imageid }}" >> $GITHUB_STEP_SUMMARY
echo "Digest: ${{ steps.docker-build.outputs.digest }}" >> $GITHUB_STEP_SUMMARY
echo "Metadata: ${{ toJSON(fromJSON(steps.docker-build.outputs.metadata)) }}" >> $GITHUB_STEP_SUMMARY