mirror of
https://github.com/flant/ovpn-admin.git
synced 2026-02-04 09:12:13 -08:00
Compare commits
9 Commits
31ba1607ab
...
cedc2a94ec
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cedc2a94ec | ||
|
|
da82b6e9b2 | ||
|
|
2e526b7570 | ||
|
|
38ed4afcb4 | ||
|
|
a6baacd57f | ||
|
|
0ba9eba9ba | ||
|
|
79ae6270d2 | ||
|
|
5722b2aec8 | ||
|
|
1fae52e85c |
2
.github/dependabot.yml
vendored
2
.github/dependabot.yml
vendored
@ -12,7 +12,7 @@ updates:
|
|||||||
schedule:
|
schedule:
|
||||||
interval: "weekly"
|
interval: "weekly"
|
||||||
|
|
||||||
# Dependencies listed in Dockerfile.ovpn-admin
|
# Dependencies listed in Dockerfile
|
||||||
- package-ecosystem: "docker"
|
- package-ecosystem: "docker"
|
||||||
directory: "/"
|
directory: "/"
|
||||||
schedule:
|
schedule:
|
||||||
|
|||||||
59
.github/workflows/publish-tag.yaml
vendored
59
.github/workflows/publish-tag.yaml
vendored
@ -9,16 +9,14 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
|
env:
|
||||||
|
WERF_STAGED_DOCKERFILE_VERSION: v2
|
||||||
|
# WERF_BUILDAH_MODE: auto
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: build images for tag
|
name: build images for tag
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- name: ovpn-admin
|
|
||||||
- name: openvpn
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
@ -26,40 +24,29 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Get the version
|
- uses: werf/actions/install@v1.2
|
||||||
id: get_version
|
|
||||||
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Login into ghcr.io
|
||||||
uses: docker/setup-buildx-action@v2
|
shell: bash
|
||||||
|
run: werf cr login -u ${{ github.actor }} -p ${{ github.token }} ghcr.io/${{ github.repository }}
|
||||||
|
|
||||||
# Login against a Docker registry except on PR
|
|
||||||
# https://github.com/docker/login-action
|
|
||||||
- name: Log into registry ${{ env.REGISTRY }}
|
|
||||||
if: github.event_name != 'pull_request'
|
|
||||||
uses: docker/login-action@v3.3.0
|
|
||||||
with:
|
|
||||||
registry: ${{ env.REGISTRY }}
|
|
||||||
username: ${{ secrets.DECKHOUSE_REGISTRY_USER }}
|
|
||||||
password: ${{ secrets.DECKHOUSE_REGISTRY_PASSWORD }}
|
|
||||||
|
|
||||||
# Extract metadata (tags, labels) for Docker
|
|
||||||
# https://github.com/docker/metadata-action
|
|
||||||
- name: Extract Docker metadata
|
- name: Extract Docker metadata
|
||||||
id: meta
|
|
||||||
uses: docker/metadata-action@v5.6.1
|
uses: docker/metadata-action@v5.6.1
|
||||||
with:
|
with:
|
||||||
images: ghcr.io/${{ github.repository }}/${{ matrix.name }}
|
images: ghcr.io/${{ github.repository }}/${{ matrix.name }}
|
||||||
|
|
||||||
# Build and push Docker image with Buildx (don't push on PR)
|
- name: Build Image
|
||||||
# https://github.com/docker/build-push-action
|
if: ${{ github.event_name == 'pull_request' }}
|
||||||
- name: Push Image
|
run: |
|
||||||
uses: docker/build-push-action@v4
|
source "$(werf ci-env github --as-file)"
|
||||||
with:
|
source <(jq -r '.labels | to_entries | to_entries[] | "export WERF_EXPORT_ADD_LABEL_\(.key)=\"\(.value.key)=\(.value.value)\""' <<< $DOCKER_METADATA_OUTPUT_JSON)
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
werf build
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
|
||||||
build-args: |
|
- name: Build and Push Image
|
||||||
TAG=${{ github.ref_name }}
|
if: ${{ github.event_name != 'pull_request' }}
|
||||||
platforms: linux/amd64,linux/arm64,linux/arm
|
run: |
|
||||||
file: ./Dockerfile.${{ matrix.name }}
|
source "$(werf ci-env github --as-file)"
|
||||||
|
source <(jq -r '.labels | to_entries | to_entries[] | "export WERF_EXPORT_ADD_LABEL_\(.key)=\"\(.value.key)=\(.value.value)\""' <<< $DOCKER_METADATA_OUTPUT_JSON)
|
||||||
|
|
||||||
|
werf export --tag ghcr.io/${{ github.repository }}/%image%:${{ github.ref_name }}
|
||||||
|
|||||||
@ -17,4 +17,4 @@ RUN apk add --update bash easy-rsa openssl openvpn coreutils && \
|
|||||||
ln -s /usr/share/easy-rsa/easyrsa /usr/local/bin && \
|
ln -s /usr/share/easy-rsa/easyrsa /usr/local/bin && \
|
||||||
wget https://github.com/pashcovich/openvpn-user/releases/download/v1.0.4/openvpn-user-linux-${TARGETARCH}.tar.gz -O - | tar xz -C /usr/local/bin && \
|
wget https://github.com/pashcovich/openvpn-user/releases/download/v1.0.4/openvpn-user-linux-${TARGETARCH}.tar.gz -O - | tar xz -C /usr/local/bin && \
|
||||||
rm -rf /tmp/* /var/tmp/* /var/cache/apk/* /var/cache/distfiles/*
|
rm -rf /tmp/* /var/tmp/* /var/cache/apk/* /var/cache/distfiles/*
|
||||||
RUN if [ -f "/usr/local/bin/openvpn-user-${TARGETARCH}" ]; then ln -s /usr/local/bin/openvpn-user-${TARGETARCH} /usr/local/bin/openvpn-user; fi
|
RUN if [ -f "/usr/local/bin/openvpn-user-${TARGETARCH}" ]; then ln -s /usr/local/bin/openvpn-user-${TARGETARCH} /usr/local/bin/openvpn-user; fi
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user