mirror of
https://github.com/v2rayA/v2rayA.git
synced 2026-11-20 23:02:25 +03:00
46 lines
1.3 KiB
YAML
46 lines
1.3 KiB
YAML
name: v2raya-docker
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- v*
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Prepare
|
|
id: prep
|
|
run: |
|
|
TAG=$(echo $GITHUB_REF | cut -d / -f 3)
|
|
IMAGE="mzz2017/v2raya"
|
|
echo ::set-output name=image::${IMAGE}
|
|
echo ::set-output name=tag::${TAG:1}
|
|
|
|
- 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 }}
|
|
|
|
# https://github.com/docker/build-push-action/blob/master/docs/advanced/cache.md
|
|
- name: Build production image
|
|
uses: docker/build-push-action@v2
|
|
with:
|
|
context: .
|
|
builder: ${{ steps.buildx.outputs.name }}
|
|
file: Dockerfile
|
|
platforms: linux/arm,linux/arm64,linux/amd64
|
|
push: true
|
|
tags: |
|
|
${{ steps.prep.outputs.image }}:${{ steps.prep.outputs.tag }}
|
|
${{ steps.prep.outputs.image }}:latest
|
|
cache-from: type=gha
|
|
cache-to: type=gha,mode=max |