-
Notifications
You must be signed in to change notification settings - Fork 1
executable file
·69 lines (56 loc) · 1.84 KB
/
wireguard.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: wireguard
on:
schedule:
- cron: "00 00 1 * *"
workflow_dispatch:
env:
dockerhub_repo: wireguard
gcrio_repo: wireguard
external_git: WeeJeWel/wg-easy
buildx_arches: linux/arm/v7, linux/amd64
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v2
with:
repository: ${{ env.external_git }}
path: './clone'
- name: Modify scripts and get version
id: version
run: |
output=$(date -u '+%Y%m%d%H%M%S')
echo ::set-output name=date_version::$output
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Log in to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Build and push
uses: docker/[email protected]
with:
context: ./clone
file: ./clone/Dockerfile
platforms: ${{env.buildx_arches}}
push: true
tags: |
${{github.repository_owner}}/${{env.dockerhub_repo}}:latest
${{github.repository_owner}}/${{env.dockerhub_repo}}:${{steps.version.outputs.date_version}}
ghcr.io/${{github.repository_owner}}/${{env.gcrio_repo}}:latest
ghcr.io/${{github.repository_owner}}/${{env.gcrio_repo}}:${{steps.version.outputs.date_version}}