42 lines
1,022 B
YAML
42 lines
1,022 B
YAML
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,linux/arm/v6,linux/arm/v7
|
|
push: true
|