diff --git a/.github/workflows/action.yaml b/.github/workflows/action.yaml new file mode 100644 index 0000000..da03182 --- /dev/null +++ b/.github/workflows/action.yaml @@ -0,0 +1,32 @@ +name: Linkpay Action + +on: + workflow_call: + +jobs: + Pipline: + runs-on: ubuntu-latest + steps: + - name: Get REPO NAME + run: echo "REPO_NAME=${GITHUB_REPOSITORY#*/}" >> $GITHUB_ENV + + - name: Checkout code + uses: https://git.linkiio.cn/actions/checkout@v3 + + - name: Login to Docker Registry + uses: https://git.linkiio.cn/actions/login-action@v2 + with: + registry: docker.linkiio.cn + username: ${{ vars.REGISTRY_USERNAME }} + password: ${{ vars.REGISTRY_PASSWORD }} + + - name: Build Push Docker imagee + uses: https://git.linkiio.cn/actions/build-push-action@v3 + with: + context: . + file: https://open.linkiio.cn/docker/linkpay + push: true + tags: docker.linkiio.cn/linkpay/${{ env.REPO_NAME }}:latest + build-args: | + GOPRIVATE=${{ secrets.GOPRIVATE }} + NAME=${{ env.REPO_NAME }} \ No newline at end of file