2020-08-17 12:08:42 +02:00
|
|
|
---
|
|
|
|
name: cd
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- 'v*.*.*'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
release-dockerimage:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2020-08-21 16:39:11 +02:00
|
|
|
- uses: actions/checkout@v2
|
2020-08-17 12:08:42 +02:00
|
|
|
- name: Extract dyndnsd version from tag name
|
|
|
|
run: |
|
2020-12-20 22:15:39 +01:00
|
|
|
echo "DYNDNSD_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
|
2021-02-19 16:24:38 +01:00
|
|
|
|
2020-08-17 12:08:42 +02:00
|
|
|
# https://github.com/marketplace/actions/build-and-push-docker-images
|
2021-02-19 16:24:38 +01:00
|
|
|
- name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v1
|
|
|
|
|
|
|
|
- name: Login to Docker Hub
|
|
|
|
uses: docker/login-action@v1
|
2020-08-17 12:08:42 +02:00
|
|
|
with:
|
|
|
|
username: cmur2
|
|
|
|
password: ${{ secrets.DOCKER_TOKEN }}
|
2021-02-19 16:24:38 +01:00
|
|
|
|
|
|
|
- name: Build and push Docker image for dyndnsd ${{ env.DYNDNSD_VERSION }}
|
|
|
|
uses: docker/build-push-action@v2
|
|
|
|
with:
|
|
|
|
context: docker
|
|
|
|
build-args: |
|
|
|
|
DYNDNSD_VERSION=${{ env.DYNDNSD_VERSION }}
|
|
|
|
push: true
|
|
|
|
tags: cmur2/dyndnsd:v${{ env.DYNDNSD_VERSION }}
|