diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e254f68..b290b02 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,45 +1,39 @@ name: Build on: - push: - tags: - - 'v[0-9]+.[0-9]+.[0-9]+' + workflow_dispatch: + schedule: + - cron: 0 1 * * 2 + +permissions: + contents: read + packages: write jobs: build: runs-on: ubuntu-latest steps: - - uses: docker/setup-qemu-action@v2 - - uses: docker/setup-buildx-action@v2 + - uses: actions/checkout@v4 + + - uses: docker/setup-buildx-action@v3 - - uses: docker/login-action@v2 + - uses: docker/login-action@v3 with: registry: ghcr.io - username: ${{ github.repository_owner }} + username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - id: tags - uses: docker/metadata-action@v4 + - uses: docker/metadata-action@v5 + id: meta with: images: ghcr.io/wfg/socks5-server + flavor: | + latest=true 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" + type=sha,prefix= - - uses: docker/build-push-action@v3 + - uses: docker/build-push-action@v5 with: - 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 \ No newline at end of file + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + push: true diff --git a/README.md b/README.md index 035f14b..86d0a02 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,4 @@ # Containerized SOCKS5 Proxy Server - -heavily inspired by https://github.com/net-byte/socks5-server. - ## How do I use it? ### Getting the image You can either pull it from GitHub Container Registry or build it yourself. @@ -36,6 +33,3 @@ services: container_name: socks5-server restart: unless-stopped ``` - -#### Environment variables -Coming soon.