2021-10-21 06:01:03 -04:00
|
|
|
name: Build and publish tags to Docker Hub (tags only)
|
2021-03-09 09:37:01 -05:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- '*'
|
2021-10-21 06:01:03 -04:00
|
|
|
|
2021-03-05 04:07:08 -05:00
|
|
|
jobs:
|
|
|
|
build:
|
2021-03-09 10:28:56 -05:00
|
|
|
name: build images for tag
|
2021-03-05 04:07:08 -05:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2021-03-09 09:37:01 -05:00
|
|
|
- name: Get the version
|
|
|
|
id: get_version
|
|
|
|
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
|
2023-09-04 12:24:13 -04:00
|
|
|
- name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v2
|
|
|
|
- name: Login to Docker Hub
|
|
|
|
uses: docker/login-action@v2
|
2021-03-05 04:07:08 -05:00
|
|
|
with:
|
2021-03-09 10:28:56 -05:00
|
|
|
username: ${{ secrets.DOCKER_USER }}
|
|
|
|
password: ${{ secrets.DOCKER_PASS }}
|
2023-09-04 12:24:13 -04:00
|
|
|
- name: Push openvpn image to Docker Hub
|
|
|
|
uses: docker/build-push-action@v4
|
|
|
|
with:
|
|
|
|
tags: flant/ovpn-admin:openvpn-${{ steps.get_version.outputs.VERSION }}
|
2023-09-11 02:18:48 -04:00
|
|
|
platforms: linux/amd64,linux/arm64,linux/arm
|
2023-09-04 12:24:13 -04:00
|
|
|
file: Dockerfile.openvpn
|
|
|
|
push: true
|
2021-03-17 05:05:37 -04:00
|
|
|
- name: Push ovpn-admin image to Docker Hub
|
2023-09-04 12:24:13 -04:00
|
|
|
uses: docker/build-push-action@v4
|
2021-03-09 10:14:25 -05:00
|
|
|
with:
|
2023-09-04 12:24:13 -04:00
|
|
|
tags: flant/ovpn-admin:${{ steps.get_version.outputs.VERSION }}
|
2023-09-11 02:18:48 -04:00
|
|
|
platforms: linux/amd64,linux/arm64,linux/arm
|
2023-09-04 12:24:13 -04:00
|
|
|
file: Dockerfile
|
|
|
|
push: true
|