From e5114403ffa8082628fd4a127ebd15d78af5a86f Mon Sep 17 00:00:00 2001 From: Marc Cataford Date: Fri, 19 Jul 2024 22:03:01 -0400 Subject: [PATCH] ci: improve status push to discord --- .forgejo/actions/push-status-to-discord/action.yml | 6 +++--- .forgejo/actions/push-status-to-discord/requirements.txt | 1 + .forgejo/workflows/ci.yml | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 .forgejo/actions/push-status-to-discord/requirements.txt diff --git a/.forgejo/actions/push-status-to-discord/action.yml b/.forgejo/actions/push-status-to-discord/action.yml index 05afb38..4d171c8 100644 --- a/.forgejo/actions/push-status-to-discord/action.yml +++ b/.forgejo/actions/push-status-to-discord/action.yml @@ -14,7 +14,7 @@ outputs: description: "ID of the message that was posted, for editing purposes in further calls." value: "" -run: +runs: using: "composite" steps: - name: Setup Python @@ -22,5 +22,5 @@ run: with: python-version: 3.12 - name: Install dependencies - run: pip install . - - run: python ./main.py ${{ inputs.webhook_url }} ${{ inputs.project_name }} ${{inputs.status }} + run: pip install -r ./.forgejo/actions/push-status-to-discord/requirements.txt + - run: python ./.forgejo/actions/push-status-to-discord/main.py ${{ inputs.webhook_url }} ${{ inputs.project_name }} ${{inputs.status }} diff --git a/.forgejo/actions/push-status-to-discord/requirements.txt b/.forgejo/actions/push-status-to-discord/requirements.txt new file mode 100644 index 0000000..610f441 --- /dev/null +++ b/.forgejo/actions/push-status-to-discord/requirements.txt @@ -0,0 +1 @@ +httpx==0.27 diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index de5e23f..14f13d9 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -5,6 +5,7 @@ jobs: pre-run-notify: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v4 - uses: ./.forgejo/actions/push-status-to-discord with: webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}