{"id":18782669,"url":"https://github.com/pinguet62/workflow-conclusion","last_synced_at":"2025-10-25T10:41:05.675Z","repository":{"id":239463366,"uuid":"799274693","full_name":"pinguet62/workflow-conclusion","owner":"pinguet62","description":"GitHub Action to get last workflow conclusion","archived":false,"fork":false,"pushed_at":"2025-02-05T17:16:03.000Z","size":5,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-05T18:42:37.097Z","etag":null,"topics":["actions"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pinguet62.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-11T16:33:23.000Z","updated_at":"2025-02-05T17:16:07.000Z","dependencies_parsed_at":"2024-05-12T17:29:23.877Z","dependency_job_id":null,"html_url":"https://github.com/pinguet62/workflow-conclusion","commit_stats":null,"previous_names":["pinguet62/workflow-conclusion"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinguet62%2Fworkflow-conclusion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinguet62%2Fworkflow-conclusion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinguet62%2Fworkflow-conclusion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinguet62%2Fworkflow-conclusion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pinguet62","download_url":"https://codeload.github.com/pinguet62/workflow-conclusion/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239699584,"owners_count":19682574,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actions"],"created_at":"2024-11-07T20:36:46.450Z","updated_at":"2025-10-25T10:41:00.638Z","avatar_url":"https://github.com/pinguet62.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Workflow Conclusion\n\nGitHub Action to get last workflow conclusion.\n\n## Usage\n\n```yaml\non: # any\njobs:\n  sample:\n    runs-on: ubuntu-latest\n    steps:\n      - id: example\n        uses: pinguet62/workflow-conclusion@main\n        with:\n          workflow_id: 'sample.yml'\n          branch: 'main'\n      - run: echo \"${{steps.example.outputs.workflow_conclusion}}\"\n```\n\n### Inputs 📥\n\n| Name          | Required? | Default        | Description                              |\n|---------------|-----------|----------------|------------------------------------------|\n| `workflow_id` | `true`    |                | The ID of filename of workflow           |\n| `branch`      | `false`   | current branch | Target branch                            |\n| `skip`        | `false`   | `0` (latest)   | Number of workflow executions to exclude |\n\n### Outputs 📤\n\n| Output                | Description                                                           |\n|-----------------------|-----------------------------------------------------------------------|\n| `workflow_conclusion` | `\"success\"`, `\"failure\"`, `\"cancelled\"`, or `null` if yet in progress |\n\n## Example of real use cases\n\n### Block PR when `main` build failed\n\n\u003cdetails\u003e\n  \u003csummary\u003eAdd job to check last build, then status check to forbid merge...\u003c/summary\u003e\n\n```yaml\n# test.yml\non:\n  push:\n    branches: [ 'main' ]\n  pull_request:\njobs:\n  tests:\n    runs-on: ubuntu-latest\n    steps:\n      - run: ./test.sh\n  main-stable:\n    if: github.event_name == 'pull_request'\n    runs-on: ubuntu-latest\n    steps:\n      - id: tests-main\n        uses: pinguet62/workflow-conclusion@main\n        with:\n          workflow_id: 'test.yml'\n          branch: 'main'\n      - if: steps.tests-main.outputs.workflow_conclusion == 'failure'\n        run: |\n          echo \"Fix main before next merges...\"\n          exit 1\n```\n\n\u003c/details\u003e\n\n### Notify only when conclusion changed\n\n\u003cdetails\u003e\n  \u003csummary\u003eAvoid multiple notifications when consecutive success or failure...\u003c/summary\u003e\n\n```yaml\n# test.yml\non:\n  push:\n    branches: [ 'main' ]\njobs:\n  tests:\n    runs-on: ubuntu-latest\n    steps:\n      - id: latest-execution\n        run: ./test.sh\n\n      - id: previous-execution\n        uses: pinguet62/workflow-conclusion@main\n        with:\n          workflow_id: 'test.yml' # itself\n          skip: 1 # ignore current\n\n      # notification\n      - if: always() \u0026\u0026 steps.previous-execution.outputs.workflow_conclusion == 'success' \u0026\u0026 steps.latest-execution.conclusion == 'failure'\n        run: echo \"Failure...\"\n      - if: always() \u0026\u0026 steps.previous-execution.outputs.workflow_conclusion == 'failure' \u0026\u0026 steps.latest-execution.conclusion == 'success'\n        run: echo \"Fixed...\"\n```\n\n\u003c/details\u003e\n\n### Deploy after success\n\n\u003cdetails\u003e\n  \u003csummary\u003eTrigger new workflow after another success...\u003c/summary\u003e\n\n```yaml\n# deploy.yml\non:\n  workflow_run:\n    workflows: [ 'Build \u0026 Test' ]\n    branches: [ 'main' ]\n    types: [ 'completed' ]\njobs:\n  deploy:\n    runs-on: ubuntu-latest\n    steps:\n      - id: build_test-result\n        uses: pinguet62/workflow-conclusion@main\n        with:\n          workflow_id: 'build_test.yml'\n          branch: 'main'\n\n      - if: steps.build_test-result.outputs.workflow_conclusion == 'success'\n        run: echo \"Deploy...\"\n```\n\n\u003c/details\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpinguet62%2Fworkflow-conclusion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpinguet62%2Fworkflow-conclusion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpinguet62%2Fworkflow-conclusion/lists"}