Skip to content

Update Version

Update Version #33

Workflow file for this run

name: Docker
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
on:
workflow_dispatch: #github页面手动触发
push:
tags: [ 'v*' ]
env:
# github.repository as <account>/<repo>
IMAGE_NAME_V2RAY: jrohy/v2ray
IMAGE_NAME_XRAY: jrohy/xray
PLATFORMS: linux/amd64,linux/arm64/v8,linux/386
jobs:
buildx:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Get latest tag
uses: oprypin/find-latest-tag@v1
id: octokit # The step ID to refer to later.
with:
repository: ${{ github.repository }} # The repository to scan.
# https://github.com/docker/login-action
- name: Login
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# https://github.com/docker/build-push-action
- name: Build & Push v2ray
uses: docker/build-push-action@v2
with:
context: ./docker/v2ray/
file: ./docker/v2ray/Dockerfile
push: true
platforms: ${{ env.PLATFORMS }}
tags: |
${{ env.IMAGE_NAME_V2RAY }}:${{ steps.octokit.outputs.tag }}
${{ env.IMAGE_NAME_V2RAY }}:latest
# https://github.com/docker/build-push-action
- name: Build & Push xray
uses: docker/build-push-action@v2
with:
context: ./docker/xray/
file: ./docker/xray/Dockerfile
push: true
platforms: ${{ env.PLATFORMS }}
tags: |
${{ env.IMAGE_NAME_XRAY }}:${{ steps.octokit.outputs.tag }}
${{ env.IMAGE_NAME_XRAY }}:latest