Skip to content

build:移除 GOPROXY 环境变量 #3

build:移除 GOPROXY 环境变量

build:移除 GOPROXY 环境变量 #3

Workflow file for this run

name: Docker Build and Push
on:
push:
tags:
- 'd*' # 触发条件可以根据你的需求修改
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Login to Docker Hub
run: echo "${{ secrets.REPO_PASS }}" | docker login -u "${{ secrets.REPO }}" --password-stdin
- name: Build and push Docker image
run: |
docker build -t ${{ secrets.REPO }}/deploy -f DockerfileDeploy .
docker push ${{ secrets.REPO }}/deploy:latest
docker build -t ${{ secrets.REPO }}/build -f DockerfileBuild .
docker push ${{ secrets.REPO }}/build:latest
env:
REPO: ${{ secrets.REPO }}
REPO_PASS: ${{ secrets.REPO_PASS }}