45 lines
1.2 KiB
YAML
45 lines
1.2 KiB
YAML
name: Frps with web docker build & push
|
|
|
|
on:
|
|
push:
|
|
branches: ["master"]
|
|
pull_request:
|
|
branches: ["master"]
|
|
|
|
jobs:
|
|
image:
|
|
name: Build Image from Dockerfile and binaries
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
# environment
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: "0"
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v2
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
|
|
# get image tag name
|
|
- name: Get Image Tag Name
|
|
run: |
|
|
echo "TAG_NAME=$(cat pkg/util/version/version.go | sed -ne "s/var\sversion\s=\s\"\(.*\)\"/\1/gp")" >> $GITHUB_ENV
|
|
- name: Login to DockerHub
|
|
uses: docker/login-action@v2
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
|
|
|
- name: Build and push frps
|
|
uses: docker/build-push-action@v3
|
|
with:
|
|
context: .
|
|
file: ./dockerfiles/Dockerfile-for-frps-web-build
|
|
platforms: linux/amd64 #,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x
|
|
push: true
|
|
tags: |
|
|
${{ secrets.DOCKERHUB_USERNAME }}/frps:${{ env.TAG_NAME }}
|