Browse Source

Add GitHub workflow for publishing to Docker Hub

pull/20/head 2.1.2
Jordan Potter 4 years ago
parent
commit
6c3f0bf0b6
  1. 42
      .github/workflows/publish.yml

42
.github/workflows/publish.yml

@ -0,0 +1,42 @@
name: Publish
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Get metadata for Docker image
id: docker-metadata
uses: docker/metadata-action@v3
with:
images: jordanpotter/wireguard
tags: |
type=semver,pattern={{version}}
- name: Log into Docker Hub
uses: docker/login-action@v1
with:
username: jordanpotter
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
tags: ${{ steps.docker-metadata.outputs.tags }}
labels: ${{ steps.docker-metadata.outputs.labels }}
platforms: linux/amd64,linux/arm64
push: true
Loading…
Cancel
Save