fix: 添加环境变量参数不生效问题 #20
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: pushdocker | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Setup QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Setup Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Set Version | |
run: echo VERSION=`git describe --tags --always` >> $GITHUB_ENV | |
- name: Build and push | |
uses: docker/build-push-action@v3 | |
with: | |
context: ./build | |
file: ./build/Dockerfile | |
push: true | |
platforms: | | |
linux/amd64 | |
linux/arm64 | |
build-args: | | |
VERSION=${{ env.VERSION }} | |
tags: | | |
${{ secrets.DOCKERHUB_USERNAME }}/openvpn:latest | |
${{ secrets.DOCKERHUB_USERNAME }}/openvpn:${{ env.VERSION }} |