Skip to content
This repository was archived by the owner on Mar 16, 2024. It is now read-only.

Commit 4c0fe89

Browse files
author
Wyatt Gill
authored
Merge pull request #15 from wfg/add-actions
Add initial action
2 parents fbd63c4 + 8060c65 commit 4c0fe89

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

.github/workflows/publish.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
tags:
8+
- v*
9+
10+
env:
11+
IMAGE_NAME: openvpn-client
12+
13+
jobs:
14+
publish:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Check out repository
19+
uses: actions/checkout@v2
20+
21+
- name: Get the version
22+
id: get_version
23+
run: echo ::set-output name=VERSION::${GITHUB_REF#/refs/tags/v}
24+
25+
- name: Set up QEMU
26+
uses: docker/setup-qemu-action@v1
27+
id: qemu
28+
with:
29+
platforms: linux/amd64,linux/arm64,linux/arm/v7
30+
31+
- name: Set up Docker Buildx
32+
uses: docker/setup-buildx-action@v1
33+
id: buildx
34+
with:
35+
install: true
36+
37+
- name: Log in to registry
38+
uses: docker/login-action@v1
39+
with:
40+
registry: ghcr.io
41+
username: ${{ github.repository_owner }}
42+
password: ${{ secrets.GITHUB_TOKEN }}
43+
44+
- name: Build and push
45+
uses: docker/build-push-action@v2
46+
with:
47+
platforms: ${{ steps.qemu.outputs.platforms }}
48+
tags: |
49+
ghcr.io/wfg/openvpn-client:${{ steps.get_version.outputs.VERSION }}
50+
ghcr.io/wfg/openvpn-client:latest
51+
push: true

0 commit comments

Comments
 (0)