-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (39 loc) · 1.26 KB
/
deploy-images.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
name: Deploy Images
on:
workflow_dispatch:
push:
paths-ignore:
- 'VERSION'
branches: [ "master" ]
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
strategy:
matrix:
image: [
temporal-worker/worker.Dockerfile,
temporal-httpin/httpin.Dockerfile,
temporal-triggerui/trigger_ui.Dockerfile,
temporal-transcode-worker/transcode-worker.Dockerfile,
]
steps:
- uses: actions/checkout@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push image
run: |
IMAGE=${{matrix.image}}
IMAGE_NAME=${IMAGE%/*}:${{ github.sha }}
IMAGE_NAME_LATEST=${IMAGE%/*}:latest
DOCKER_FILE=${IMAGE#*/}
docker build . --file $DOCKER_FILE --tag ghcr.io/bcc-code/bcc-media/$IMAGE_NAME
docker tag ghcr.io/bcc-code/bcc-media/$IMAGE_NAME ghcr.io/bcc-code/bcc-media/$IMAGE_NAME_LATEST
docker push ghcr.io/bcc-code/bcc-media/$IMAGE_NAME
docker push ghcr.io/bcc-code/bcc-media/$IMAGE_NAME_LATEST