Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/legytma/gitea-wait-for-checks
Action to Wait Checks using Gitea API
https://github.com/legytma/gitea-wait-for-checks
Last synced: about 2 months ago
JSON representation
Action to Wait Checks using Gitea API
- Host: GitHub
- URL: https://github.com/legytma/gitea-wait-for-checks
- Owner: Legytma
- License: apache-2.0
- Created: 2024-03-14T20:09:37.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2024-06-04T14:43:52.000Z (7 months ago)
- Last Synced: 2024-06-04T16:36:46.957Z (7 months ago)
- Language: JavaScript
- Size: 801 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# gitea-wait-for-checks
![Check Transpiled JavasScript](https://github.com/Legytma/gitea-wait-for-checks/actions/workflows/check-dist.yml/badge.svg)
[![GitHub Super-Linter](https://github.com/Legytma/gitea-wait-for-checks/actions/workflows/linter.yml/badge.svg)](https://github.com/super-linter/super-linter)
![CI](https://github.com/Legytma/gitea-wait-for-checks/actions/workflows/ci.yml/badge.svg)
![CodeQL](https://github.com/Legytma/gitea-wait-for-checks/actions/workflows/codeql-analysis.yml/badge.svg)
![Coverage](badges/coverage.svg)
![Release](https://shields.io/github/v/release/Legytma/gitea-wait-for-checks)
![Release](https://shields.io/github/package-json/v/Legytma/gitea-wait-for-checks)**_This action was inspired on
[lewagon/wait-on-check-action](https://github.com/lewagon/wait-on-check-action).
And is writed in JavaScript to work on Gitea Actions._**Pause a workflow until a job in another workflow completes successfully.
This action uses the
[Gitea API (Get a commit's statuses)](https://docs.gitea.com/api/1.21/#tag/repository/operation/repoListStatuses)
to poll for check results. On success, the action exit allowing the workflow
resume. Otherwise, the action will exit with status code 1 and fail the whole
workflow.This is a workaround to Gitea Action's limitation of non-interdependent
workflows :tada:You can **run your workflows in parallel** and pause a job until a job in
another workflow completes successfully.## Minimal example
`.gitea/workflows/test.yaml`
```yml
name: Teston: [push]
jobs:
test:
name: Run tests
runs-on: ubuntu-latest
steps:
...
````.gitea/workflows/push.yaml`
```yml
name: Publishon: [push]
jobs:
publish:
name: Publish the package
runs-on: ubuntu-latest
steps:
- name: Wait for tests to succeed
uses: Legytma/[email protected]
...
```### Using Workflow Name
Each workflow name must be on one line.
`.gitea/workflows/push.yaml`
```yml
name: Publishon: [push]
jobs:
publish:
name: Publish the package
runs-on: ubuntu-latest
steps:
- name: Wait for tests to succeed
uses: Legytma/[email protected]
with:
workflow-names: |-
Test
...
```### Using Job Name
Each workflow name must be on one line.
`.gitea/workflows/push.yaml`
```yml
name: Publishon: [push]
jobs:
publish:
name: Publish the package
runs-on: ubuntu-latest
steps:
- name: Wait for tests to succeed
uses: Legytma/[email protected]
with:
job-names: |-
Run tests
...
```### Wait interval (optional, default: 10)
As it could be seen in many examples, there's a parameter `wait-interval`, and
sets a time in seconds to be waited between requests to the GitHub API. The
default time is 10 seconds.