1
0
Fork 0
mirror of synced 2024-11-10 19:38:58 -05:00
ovpn-admin/.github/workflows/publish-tag.yaml
2021-03-09 18:28:56 +03:00

34 lines
1.1 KiB
YAML

name: Build and publish to Docker Hub (tags only)
on:
push:
tags:
- '*'
jobs:
build:
name: build images for tag
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Push openvpn image to Docker Hub
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}
repository: flant/openvpn-admin
tags: openvpn-${{ steps.get_version.outputs.VERSION }}
dockerfile: Dockerfile.openvpn
- name: Push openvpn-admin image to Docker Hub
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}
repository: flant/openvpn-admin
tags: ${{ steps.get_version.outputs.VERSION }}
dockerfile: Dockerfile