-
Notifications
You must be signed in to change notification settings - Fork 5
69 lines (60 loc) · 1.97 KB
/
docker.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Build Docker
on:
push:
pull_request:
branches: [main]
env:
BEEPER_BRIDGE_TYPE: dummybridge
CI_REGISTRY_IMAGE: "${{ secrets.CI_REGISTRY }}/bridge/dummybridgego"
GHCR_REGISTRY: ghcr.io
GHCR_REGISTRY_IMAGE: "ghcr.io/${{ github.repository }}/go"
GHCR_REGISTRY_LOGINHELPER_IMAGE: "ghcr.io/${{ github.repository }}/loginhelper"
jobs:
build-docker-dummybridge:
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Beeper Docker registry
uses: docker/login-action@v3
with:
registry: ${{ secrets.CI_REGISTRY }}
username: ${{ secrets.CI_REGISTRY_USER }}
password: ${{ secrets.CI_REGISTRY_PASSWORD }}
- name: Login to ghcr
uses: docker/login-action@v3
with:
registry: ${{ env.GHCR_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker Build
uses: docker/build-push-action@v6
with:
# cache-from: ${{ env.CI_REGISTRY_IMAGE }}:latest
pull: true
file: ./cmd/dummybridge/Dockerfile
tags: |
${{ env.CI_REGISTRY_IMAGE }}:${{ github.sha }}
${{ env.GHCR_REGISTRY_IMAGE }}:${{ github.sha }}
push: true
build-docker-loginhelper:
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to ghcr
uses: docker/login-action@v3
with:
registry: ${{ env.GHCR_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker Build
uses: docker/build-push-action@v6
with:
cache-from: ${{ env.GHCR_REGISTRY_LOGINHELPER_IMAGE }}/loginhelper:latest
pull: true
file: ./cmd/loginhelper/Dockerfile
tags: |
${{ env.GHCR_REGISTRY_LOGINHELPER_IMAGE }}:${{ github.sha }}
${{ env.GHCR_REGISTRY_LOGINHELPER_IMAGE }}:latest
push: true