mirror of
https://github.com/xjasonlyu/tun2socks.git
synced 2024-12-30 02:37:01 +00:00
49 lines
1.1 KiB
YAML
49 lines
1.1 KiB
YAML
name: Publish Docker Image
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
paths-ignore:
|
|
- '.github/**'
|
|
- 'assets/**'
|
|
- '.gitignore'
|
|
- 'README.md'
|
|
|
|
jobs:
|
|
|
|
build:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
|
|
- name: Check out code into the Go module directory
|
|
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: Login to DockerHub
|
|
uses: docker/login-action@v1
|
|
with:
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
|
|
- name: Get Version
|
|
id: version
|
|
uses: oprypin/find-latest-tag@v1
|
|
with:
|
|
repository: xjasonlyu/tun2socks
|
|
|
|
- name: Build and Push
|
|
uses: docker/build-push-action@v2
|
|
with:
|
|
push: true
|
|
platforms: linux/amd64,linux/arm64
|
|
tags: |
|
|
xjasonlyu/tun2socks:latest
|
|
xjasonlyu/tun2socks:${{ steps.version.outputs.tag }}
|