-
Notifications
You must be signed in to change notification settings - Fork 5
47 lines (42 loc) · 1.25 KB
/
restund.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
name: restund
on:
push:
branches: [ main ]
paths:
- 'libre/Dockerfile'
- 'restund/Dockerfile'
- '.github/workflows/restund.yml'
pull_request:
branches: [ main ]
paths:
- 'libre/Dockerfile'
- 'restund/Dockerfile'
- '.github/workflows/restund.yml'
env:
VERSION_RESTUND: main
jobs:
restund:
env:
IMAGE_NAME: ${{ github.repository }}/restund
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Log into registry
uses: docker/login-action@v1
with:
registry: "ghcr.io"
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build
run: |
docker build restund -t restund \
--build-arg VERSION=${{ env.VERSION_RESTUND }} \
--build-arg IMAGE=ghcr.io/baresip/docker/libre:latest \
--build-arg RELEASE=1
- name: Tag and Push image
if: github.event_name != 'pull_request'
run: |
docker tag restund ghcr.io/${{ env.IMAGE_NAME }}:${{ env.VERSION_RESTUND }}
docker tag restund ghcr.io/${{ env.IMAGE_NAME }}:latest
docker push ghcr.io/${{ env.IMAGE_NAME }}:${{ env.VERSION_RESTUND }}
docker push ghcr.io/${{ env.IMAGE_NAME }}:latest