From e08c5df5e763952751f0544f8b20835088f631d5 Mon Sep 17 00:00:00 2001 From: gilesb Date: Mon, 23 Oct 2023 21:24:47 +0100 Subject: [PATCH] .... --- .gitea/workflows/develop -> build.yml | 8 +++----- .gitea/workflows/pr-closed.yml | 9 ++++----- .gitea/workflows/tea.yml | 18 ++++++++++++++++++ 3 files changed, 25 insertions(+), 10 deletions(-) create mode 100644 .gitea/workflows/tea.yml diff --git a/.gitea/workflows/develop -> build.yml b/.gitea/workflows/develop -> build.yml index 8c63fae..8c26095 100644 --- a/.gitea/workflows/develop -> build.yml +++ b/.gitea/workflows/develop -> build.yml @@ -16,10 +16,9 @@ jobs: - env: env run: printenv - name: get tea - run: | - curl https://dl.gitea.com/tea/0.9.2/tea-0.9.2-linux-386 --output ../tea - chmod +x ./tea - ./tea login add -n=this --url=${{ github.server_url}} -t=${{ secrets.BOT_TOKEN }} + uses: ./.github/tea.yml + secrets: + token: ${{ secrets.BOT_TOKEN }} - uses: http://sigyl.com:3000/actions/setup-node@v3 with: node-version: '20' @@ -71,7 +70,6 @@ jobs: fi; - name: make PR run: | - ../tea login add -n=this --url=${{ github.server_url}} -t=${{ secrets.BOT_TOKEN }} ../tea pr ls -f=base,head -o=csv if [[ $(./tea pr ls -f=base,head -o=csv | grep "\"master\",\"${{ github.ref_name }}\"" | head -c1 | wc -c) -eq 0 ]]; then ./tea pr c --base=master --head=${{ github.ref_name }} --description=" diff --git a/.gitea/workflows/pr-closed.yml b/.gitea/workflows/pr-closed.yml index 308d9b9..8a24c6a 100644 --- a/.gitea/workflows/pr-closed.yml +++ b/.gitea/workflows/pr-closed.yml @@ -13,11 +13,10 @@ jobs: if: github.event.pull_request.merged == true runs-on: ubuntu-latest steps: - -name: get tea - run: | - curl https://dl.gitea.com/tea/0.9.2/tea-0.9.2-linux-386 --output ../tea - chmod +x ./tea - ./tea login add -n=this --url=${{ github.server_url}} -t=${{ secrets.BOT_TOKEN }} + - name: get tea + uses: ./.github/tea.yml + secrets: + token: ${{ secrets.BOT_TOKEN }} - uses: http://sigyl.com:3000/actions/checkout@v3.5.4 with: token: ${{ secrets.BOT_TOKEN }} diff --git a/.gitea/workflows/tea.yml b/.gitea/workflows/tea.yml new file mode 100644 index 0000000..e247431 --- /dev/null +++ b/.gitea/workflows/tea.yml @@ -0,0 +1,18 @@ +name: tea +run-name: tea + +on: + workflow_call: + secrets: + token: + required: true + +jobs: + tea: + runs-on: ubuntu-latest + steps: + -name: get tea + run: | + curl https://dl.gitea.com/tea/0.9.2/tea-0.9.2-linux-386 --output ../tea + chmod +x ./tea + ./tea login add -n=this --url=${{ github.server_url}} -t=${{ secrets.token }}