Code Monkey home page Code Monkey logo

Comments (2)

Ran-Xing avatar Ran-Xing commented on August 25, 2024

友情赞助你个 github action yaml

name: Docker Build

on:
  workflow_dispatch:
  watch:
    types: started

jobs:
  Docker_Build:
    name: Docker Build
    runs-on: ubuntu-latest
    steps:
      - 
        name: Private Actions Checkout
        uses: actions/checkout@v3
      - 
        name: Docker Setup QEMU
        uses: docker/setup-qemu-action@v1
      - 
        name: Docker Setup Buildx
        uses: docker/setup-buildx-action@v1
      - 
        name: Docker Login in Aliyun
        uses: docker/login-action@v1
        with:
          registry: ${{ secrets.DOCKERHUB_REGISTRY_ALIYUN }}
          username: ${{ secrets.DOCKERHUB_ACCOUNT_ALIYUN }}
          password: ${{ secrets.DOCKERHUB_PASSWORD_ALIYUN }}
      - 
        name: Docker Login in Hub
        uses: docker/login-action@v1
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
      - 
        name: Docker Login in Github
        uses: docker/login-action@v1
        with:
          registry: ghcr.io
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.TOKEN_GITHUB }}
      - 
        name: Build and push Docker images
        uses: docker/build-push-action@v2
        with:
          context: .
          # platforms: linux/amd64,linux/arm64
          file: Dockerfiles/Dockerfile
          push: true
          tags: |
            ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_REPO }}:v14
            ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_REPO }}:latest
            ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_REPO }}:v14
            ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_REPO }}:latest
            ${{ secrets.DOCKERHUB_REGISTRY_ALIYUN }}/${{ secrets.DOCKERHUB_USERNAME_ALIYUN }}/${{ secrets.DOCKERHUB_REPO }}:v14
            ${{ secrets.DOCKERHUB_REGISTRY_ALIYUN }}/${{ secrets.DOCKERHUB_USERNAME_ALIYUN }}/${{ secrets.DOCKERHUB_REPO }}:latest
          cache-from: type=registry,ref=${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_REPO }}:v14.cache
          cache-to: type=registry,ref=${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_REPO }}:v14.cache,mode=max
      - 
        # 更新 hub.docker.com 描述页面
        name: Docker Hub Description
        uses: peter-evans/dockerhub-description@v2
        with:
          username: ${{ SECRETS.DOCKERHUB_USERNAME }}
          password: ${{ SECRETS.DOCKERHUB_PASSWORD }}
          repository: ${{ SECRETS.DOCKERHUB_USERNAME }}/${{ SECRETS.DOCKERHUB_REPO }}
      -
        name: Get Data 
        id: getDingData
        run: |
          set -ex
          # 输出仓库名
          REPOSITORY="${{GITHUB.REPOSITORY}}"
          echo "::set-output name=REPOSITORY::${REPOSITORY#*/}"
          
          # 获取用户仓库信息
          # RESPONSE="$(curl -sLm 10 https://api.github.com/repos/${{ GITHUB.REPOSITORY }})"
          # 建议填写自己的 TOKEN
          RESPONSE="$(curl -sLm 10 https://api.github.com/repos/${{ GITHUB.REPOSITORY }} -H "Authorization: token ${{ SECRETS.TOKEN_GITHUB }}")"
          
          # 获取 用户仓库 设置的 描述,如果为空,可能是没有使用 TOKEN
          DESCRIPTION="$(jq -r .description <(echo ${RESPONSE}))"
          echo "::set-output name=DESCRIPTION::${DESCRIPTION}"

          # 获取 用户仓库 设置的 URL, 如果没有就输出 Github 地址
          URL="$(jq -r .homepage <(echo ${RESPONSE}))"
          if [[ "${URL}" == "null" || "${URL}" == "" ]]; then
            echo "::set-output name=URL::${{ GITHUB.SERVER_URL }}/${{ GITHUB.REPOSITORY }}"
          else
            echo "::set-output name=URL::${URL}"
          fi
      - 
        name: Send dingding notify
        uses: zcong1993/actions-ding@master
        with:
          dingToken: ${{ SECRETS.DING_TOKEN }}
          secret: ${{ SECRETS.DING_SECRET }}
          body: |
            {
              "msgtype": "link",
              "link": {
                  "text": "${{ steps.getDingData.outputs.DESCRIPTION }}",
                  "title":  "${{ steps.getDingData.outputs.REPOSITORY }} WorkFlow ${{ GITHUB.JOB }} Success!",
                  "picUrl": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png",
                  "messageUrl": "${{ steps.getDingData.outputs.URL }}"
              }
            }

from checkchan-dist.

easychen avatar easychen commented on August 25, 2024

用户都没有设置 密码,启动个锤子的vnc

有没有一种可能,部署到内网的VNC不需要密码?

能不能给普通用户留条路,docker 加个 dingding 不为过吧 你收费咋也理解,但是钉钉飞书本来就是免费的,webhook 也是免费的这是关键啊

首先,Check酱本身就免费的,并没有收费。

其次,钉钉飞书是免费的,那你也不能在钉钉里边和飞书用户聊天啊?

能不能给独立开发者留条活路,大家都是要养家糊口的。且不说Server酱本来就有免费额度,就算年费会员算下来一个月才3块钱而已。

from checkchan-dist.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.