Skip to content

qoomon/actions--context

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Enhanced Job Context   Actions

This action provides an enhanced job context for GitHub Actions e.g., job_id.

This action will also work with matrix jobs and/or within reusable workflows!

Note

If you're missing a context value feel free to open a feature request

Usage

jobs:
  example:
    runs-on: ubuntu-latest
    environment: playground
    steps:
      - uses: qoomon/actions--context@v3
        id: context

      - run: |
          echo "Current Environment: ${{ steps.context.outputs.environment }}"
          echo "Job Logs: ${{ steps.context.outputs.job_log_url }}"

Outputs

outputs:
  job:
    description: The workflow job name of the current job.
  job_id:
    description: The workflow run job id of the current job.
  job_log_url:
    description: The HTML url of the job log for the current job.

  run_id:
    description: The workflow run id of the current job.
  run_attempt:
    description: The workflow run attempt of the current job.
  run_number:
    description: The workflow run number of the current job. Same as `github.run_number`.

  environment:
    description: The environment of the current job.
  environment_url:
    description: The environment HTML url of the current job.

  deployment_id:
    description: The deployment id of the current job.
  deployment_url:
    description: The deployment HTML url of the current job.
  deployment_workflow_url:
    description: The deployment workflow HTML url of the current job.
  deployment_log_url:
    description: The deployment log HTML url of the current job.

Development

Release New Action Version

  • Trigger the Release workflow
    • The workflow will create a new release with the given version and also move the related major version tag e.g. v1 to point to this new release