mirror of
https://github.com/wfg/docker-wireguard.git
synced 2025-12-20 00:15:42 +01:00
Adjust indents
This commit is contained in:
64
.github/workflows/build.yaml
vendored
64
.github/workflows/build.yaml
vendored
@@ -3,44 +3,44 @@ name: Build
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v[0-9]+.[0-9]+.[0-9]+'
|
||||
- 'v[0-9]+.[0-9]+.[0-9]+'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: docker/setup-qemu-action@v2
|
||||
- uses: docker/setup-buildx-action@v2
|
||||
- uses: docker/setup-qemu-action@v2
|
||||
- uses: docker/setup-buildx-action@v2
|
||||
|
||||
- uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- id: tags
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
images: ghcr.io/wfg/wireguard
|
||||
tags: |
|
||||
type=semver,pattern={{version}}
|
||||
type=semver,pattern={{major}}.{{minor}}
|
||||
type=semver,pattern={{major}},enable=${{ !startsWith(github.ref, 'refs/tags/v0.') }}
|
||||
- id: tags
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
images: ghcr.io/wfg/wireguard
|
||||
tags: |
|
||||
type=semver,pattern={{version}}
|
||||
type=semver,pattern={{major}}.{{minor}}
|
||||
type=semver,pattern={{major}},enable=${{ !startsWith(github.ref, 'refs/tags/v0.') }}
|
||||
|
||||
- id: build-args
|
||||
run: |
|
||||
ref=${{ github.ref }}
|
||||
vpatch=${ref##refs/*/}
|
||||
patch=${vpatch#v}
|
||||
echo "::set-output name=date::$(date --utc --iso-8601=seconds)"
|
||||
echo "::set-output name=version::$patch"
|
||||
- id: build-args
|
||||
run: |
|
||||
ref=${{ github.ref }}
|
||||
vpatch=${ref##refs/*/}
|
||||
patch=${vpatch#v}
|
||||
echo "::set-output name=date::$(date --utc --iso-8601=seconds)"
|
||||
echo "::set-output name=version::$patch"
|
||||
|
||||
- uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: "{{defaultContext}}:build"
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
|
||||
build-args: |
|
||||
BUILD_DATE=${{ steps.build-args.outputs.date }}
|
||||
IMAGE_VERSION=${{ steps.build-args.outputs.version }}
|
||||
tags: ${{ steps.tags.outputs.tags }}
|
||||
push: true
|
||||
- uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: "{{defaultContext}}:build"
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
|
||||
build-args: |
|
||||
BUILD_DATE=${{ steps.build-args.outputs.date }}
|
||||
IMAGE_VERSION=${{ steps.build-args.outputs.version }}
|
||||
tags: ${{ steps.tags.outputs.tags }}
|
||||
push: true
|
||||
|
||||
@@ -3,11 +3,11 @@ services:
|
||||
image: ghcr.io/wfg/wireguard:latest
|
||||
container_name: wireguard
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
- NET_ADMIN
|
||||
sysctls:
|
||||
- net.ipv4.conf.all.src_valid_mark=1
|
||||
- net.ipv4.conf.all.src_valid_mark=1
|
||||
environment:
|
||||
- ALLOWED_SUBNETS=192.168.10.0/24
|
||||
- ALLOWED_SUBNETS=192.168.10.0/24
|
||||
volumes:
|
||||
- ./wg0.conf:/etc/wireguard/wg0.conf
|
||||
- ./wg0.conf:/etc/wireguard/wg0.conf
|
||||
restart: unless-stopped
|
||||
|
||||
Reference in New Issue
Block a user