|
| 1 | +# name: GIN-VUE-ADMIN Docker Build |
| 2 | + |
| 3 | +# on: |
| 4 | +# workflow_dispatch: |
| 5 | +# inputs: |
| 6 | +# webtag: |
| 7 | +# description: 'Set web tag, Default latest' |
| 8 | +# required: true |
| 9 | +# default: "latest" |
| 10 | +# servertag: |
| 11 | +# description: 'Set server tag, Default latest' |
| 12 | +# required: true |
| 13 | +# default: "latest" |
| 14 | + |
| 15 | +# jobs: |
| 16 | +# GIN_VUE_ADMIN_WEB: |
| 17 | +# name: GIN VUE ADMIN WEB |
| 18 | +# runs-on: ubuntu-latest |
| 19 | +# steps: |
| 20 | +# - name: Private Actions Checkout |
| 21 | +# uses: actions/checkout@v2.3.4 |
| 22 | +# - name: Docker Setup QEMU |
| 23 | +# uses: docker/setup-qemu-action@v1.2.0 |
| 24 | +# - name: Docker Setup Buildx |
| 25 | +# uses: docker/setup-buildx-action@v1.6.0 |
| 26 | +# - name: Docker Login |
| 27 | +# uses: docker/login-action@v1.10.0 |
| 28 | +# with: |
| 29 | +# username: ${{ secrets.DOCKERHUB_USERNAME }} |
| 30 | +# password: ${{ secrets.DOCKERHUB_TOKEN }} |
| 31 | +# - name: Docker Login in Aliyun |
| 32 | +# uses: docker/login-action@v1.10.0 |
| 33 | +# with: |
| 34 | +# registry: ${{ secrets.DOCKERHUB_REGISTRY_ALIYUN }} |
| 35 | +# username: ${{ secrets.DOCKERHUB_ACCOUNT_ALIYUN }} |
| 36 | +# password: ${{ secrets.DOCKERHUB_PASSWORD_ALIYUN }} |
| 37 | +# - name: Build and push Docker images |
| 38 | +# uses: docker/build-push-action@v2.7.0 |
| 39 | +# with: |
| 40 | +# context: . |
| 41 | +# # 这里是适配 arm64 ,主要看你们的程序是否支持 arm64 |
| 42 | +# platforms: linux/amd64,linux/arm64 |
| 43 | +# file: web/Dockerfile |
| 44 | +# push: true |
| 45 | +# # 这里是给docker 打标签,默认不上传 latest |
| 46 | +# tags: | |
| 47 | +# ${{ secrets.DOCKERHUB_USERNAME }}/web:${{ github.event.inputs.webtag }} |
| 48 | +# ${{ secrets.DOCKERHUB_REGISTRY_ALIYUN }}/${{ secrets.DOCKERHUB_USERNAME_ALIYUN }}web:${{ github.event.inputs.webtag }} |
| 49 | +# cache-from: type=registry,ref=${{ secrets.DOCKERHUB_USERNAME }}/web:${{ github.event.inputs.webtag }}.cache |
| 50 | +# cache-to: type=registry,ref=${{ secrets.DOCKERHUB_USERNAME }}/web:${{ github.event.inputs.webtag }}.cache,mode=max |
| 51 | +# # 漏洞扫描 |
| 52 | +# - name: Scan for vulnerabilities |
| 53 | +# uses: crazy-max/ghaction-container-scan@v1 |
| 54 | +# with: |
| 55 | +# image: ${{ secrets.DOCKERHUB_USERNAME }}/web:${{ github.event.inputs.webtag }} |
| 56 | +# dockerfile: web/Dockerfile |
| 57 | +# # 更新 docker 描述页面 |
| 58 | +# - name: Docker Hub Description |
| 59 | +# uses: peter-evans/dockerhub-description@v2 |
| 60 | +# with: |
| 61 | +# username: ${{ secrets.DOCKERHUB_USERNAME }} |
| 62 | +# password: ${{ secrets.DOCKERHUB_PASSWORD }} |
| 63 | +# repository: ${{ secrets.DOCKERHUB_USERNAME }}/web |
| 64 | + |
| 65 | +# GIN_VUE_ADMIN_SERVER: |
| 66 | +# name: GIN VUE ADMIN SERVER |
| 67 | +# runs-on: ubuntu-latest |
| 68 | +# steps: |
| 69 | +# - name: Private Actions Checkout |
| 70 | +# uses: actions/checkout@v2.3.4 |
| 71 | +# - name: Docker Setup QEMU |
| 72 | +# uses: docker/setup-qemu-action@v1.2.0 |
| 73 | +# - name: Docker Setup Buildx |
| 74 | +# uses: docker/setup-buildx-action@v1.6.0 |
| 75 | +# - name: Docker Login |
| 76 | +# uses: docker/login-action@v1.10.0 |
| 77 | +# with: |
| 78 | +# username: ${{ secrets.DOCKERHUB_USERNAME }} |
| 79 | +# password: ${{ secrets.DOCKERHUB_TOKEN }} |
| 80 | +# - name: Docker Login in Aliyun |
| 81 | +# uses: docker/login-action@v1.10.0 |
| 82 | +# with: |
| 83 | +# registry: ${{ secrets.DOCKERHUB_REGISTRY_ALIYUN }} |
| 84 | +# username: ${{ secrets.DOCKERHUB_ACCOUNT_ALIYUN }} |
| 85 | +# password: ${{ secrets.DOCKERHUB_PASSWORD_ALIYUN }} |
| 86 | +# - name: Build and push Docker images |
| 87 | +# uses: docker/build-push-action@v2.7.0 |
| 88 | +# with: |
| 89 | +# context: . |
| 90 | +# # 这里是适配 arm64 ,主要看你们的程序是否支持 arm64 |
| 91 | +# platforms: linux/amd64,linux/arm64 |
| 92 | +# file: server/Dockerfile |
| 93 | +# push: true |
| 94 | +# # 这里是给docker 打标签,默认不上传 latest |
| 95 | +# tags: | |
| 96 | +# ${{ secrets.DOCKERHUB_USERNAME }}/server:${{ github.event.inputs.servertag }} |
| 97 | +# ${{ secrets.DOCKERHUB_REGISTRY_ALIYUN }}/${{ secrets.DOCKERHUB_USERNAME_ALIYUN }}server:${{ github.event.inputs.servertag }} |
| 98 | +# cache-from: type=registry,ref=${{ secrets.DOCKERHUB_USERNAME }}/server:${{ github.event.inputs.servertag }}.cache |
| 99 | +# cache-to: type=registry,ref=${{ secrets.DOCKERHUB_USERNAME }}/server:${{ github.event.inputs.servertag }}.cache,mode=max |
| 100 | +# # 漏洞扫描 |
| 101 | +# - name: Scan for vulnerabilities |
| 102 | +# uses: crazy-max/ghaction-container-scan@v1 |
| 103 | +# with: |
| 104 | +# image: ${{ secrets.DOCKERHUB_USERNAME }}/server:${{ github.event.inputs.servertag }} |
| 105 | +# dockerfile: server/Dockerfile |
| 106 | +# # 更新 docker 描述页面 |
| 107 | +# - name: Docker Hub Description |
| 108 | +# uses: peter-evans/dockerhub-description@v2 |
| 109 | +# with: |
| 110 | +# username: ${{ secrets.DOCKERHUB_USERNAME }} |
| 111 | +# password: ${{ secrets.DOCKERHUB_PASSWORD }} |
| 112 | +# repository: ${{ secrets.DOCKERHUB_USERNAME }}/server |
0 commit comments