docker / docker/metadata-action
Add an annotation/label of the github actions job url that created the image
Open
Nobody has claimed this yet.
kind/enhancement
- Dominant language
- TypeScript
- Stars
- 1.1k
- Forks
- 160
- Avg merge
- 4d 17h
- Merged PRs (30d)
- 12
Description
Description
so that we can trace back the github actions
something like:
const github_token = getInput('github_token') || process.env.GITHUB_TOKEN
const owner = context.repo.owner
const repo = context.repo.repo
const run_id = Number(context.runId)
const job_name = context.job
const octokit = getOctokit(github_token)
const jobs = await octokit.paginate(octokit.rest.actions.listJobsForWorkflowRun, {
run_id,
owner,
repo,
})
const job = jobs.find(job => job.name === job_name)
return job.html_url;
ps. I'm willing to open an PR if this would be acceptable
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the action entry point and review the supplied context.runId/context.job values and octokit.rest.actions.listJobsForWorkflowRun call. Done means the generated image metadata includes the creating GitHub Actions job's html_url, with the intended label or annotation format confirmed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, typescript
- Domain
- ci-cd, devops
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100