Files
v2rayA/.github/workflows/dockerimage.yml
T
2020-06-07 00:57:18 +08:00

32 lines
967 B
YAML

name: v2raya
on:
push:
tags:
- v*
env:
DOCKER_CLI_EXPERIMENTAL: enabled
DOCKER_BUILDKIT: 1
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
- uses: actions/checkout@v2
- name: Set up Docker Buildx
id: buildx
uses: crazy-max/ghaction-docker-buildx@v1
with:
buildx-version: latest
qemu-version: latest
- name: Build the Docker image
run: |
docker login -u ${{secrets.DOCKER_USERNAME}} -p ${{secrets.DOCKER_PASSWORD}}
v=$(echo ${{ steps.get_version.outputs.VERSION }} | cut -c2-)
docker buildx build -t mzz2017/v2raya:$v -f Dockerfile --platform=linux/arm,linux/arm64,linux/amd64 . --push
docker buildx build -t mzz2017/v2raya:latest -f Dockerfile --platform=linux/arm,linux/arm64,linux/amd64 . --push