mirror of
https://github.com/docker/metadata-action.git
synced 2025-04-19 06:59:33 +02:00
Compare commits
No commits in common. "master" and "v1.3.0" have entirely different histories.
@ -1,12 +1 @@
|
|||||||
/coverage
|
node_modules
|
||||||
|
|
||||||
# Dependency directories
|
|
||||||
node_modules/
|
|
||||||
jspm_packages/
|
|
||||||
|
|
||||||
# yarn v2
|
|
||||||
.yarn/cache
|
|
||||||
.yarn/unplugged
|
|
||||||
.yarn/build-state.yml
|
|
||||||
.yarn/install-state.gz
|
|
||||||
.pnp.*
|
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
/dist/**
|
|
||||||
/coverage/**
|
|
||||||
/node_modules/**
|
|
@ -1,24 +0,0 @@
|
|||||||
{
|
|
||||||
"env": {
|
|
||||||
"node": true,
|
|
||||||
"es6": true,
|
|
||||||
"jest": true
|
|
||||||
},
|
|
||||||
"extends": [
|
|
||||||
"eslint:recommended",
|
|
||||||
"plugin:@typescript-eslint/eslint-recommended",
|
|
||||||
"plugin:@typescript-eslint/recommended",
|
|
||||||
"plugin:jest/recommended",
|
|
||||||
"plugin:prettier/recommended"
|
|
||||||
],
|
|
||||||
"parser": "@typescript-eslint/parser",
|
|
||||||
"parserOptions": {
|
|
||||||
"ecmaVersion": 2023,
|
|
||||||
"sourceType": "module"
|
|
||||||
},
|
|
||||||
"plugins": [
|
|
||||||
"@typescript-eslint",
|
|
||||||
"jest",
|
|
||||||
"prettier"
|
|
||||||
]
|
|
||||||
}
|
|
3
.gitattributes
vendored
3
.gitattributes
vendored
@ -1,5 +1,2 @@
|
|||||||
/.yarn/releases/** binary
|
|
||||||
/.yarn/plugins/** binary
|
|
||||||
/__tests__/fixtures/** -linguist-detectable
|
|
||||||
/dist/** linguist-generated=true
|
/dist/** linguist-generated=true
|
||||||
/lib/** linguist-generated=true
|
/lib/** linguist-generated=true
|
||||||
|
1
.github/CODEOWNERS
vendored
Normal file
1
.github/CODEOWNERS
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
* @crazy-max
|
3
.github/CODE_OF_CONDUCT.md
vendored
3
.github/CODE_OF_CONDUCT.md
vendored
@ -1,3 +0,0 @@
|
|||||||
# Code of conduct
|
|
||||||
|
|
||||||
- [Moby community guidelines](https://github.com/moby/moby/blob/master/CONTRIBUTING.md#moby-community-guidelines)
|
|
37
.github/CONTRIBUTING.md
vendored
37
.github/CONTRIBUTING.md
vendored
@ -2,20 +2,33 @@
|
|||||||
|
|
||||||
Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great.
|
Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great.
|
||||||
|
|
||||||
Contributions to this project are [released](https://docs.github.com/en/github/site-policy/github-terms-of-service#6-contributions-under-repository-license)
|
Contributions to this project are [released](https://help.github.com/articles/github-terms-of-service/#6-contributions-under-repository-license) to the public under the [project's open source license](LICENSE).
|
||||||
to the public under the [project's open source license](LICENSE).
|
|
||||||
|
|
||||||
## Submitting a pull request
|
## Submitting a pull request
|
||||||
|
|
||||||
1. [Fork](https://github.com/docker/metadata-action/fork) and clone the repository
|
1. [Fork](https://github.com/crazy-max/ghaction-docker-meta/fork) and clone the repository
|
||||||
2. Configure and install the dependencies: `yarn install`
|
2. Configure and install the dependencies: `yarn install`
|
||||||
3. Create a new branch: `git checkout -b my-branch-name`
|
3. Make sure the tests pass on your machine: `yarn run test`
|
||||||
4. Make your changes
|
4. Create a new branch: `git checkout -b my-branch-name`
|
||||||
5. Make sure the tests pass: `docker buildx bake test`
|
5. Make your change, add tests, and make sure the tests still pass
|
||||||
6. Format code and build javascript artifacts: `docker buildx bake pre-checkin`
|
6. Run pre-checkin: `yarn run pre-checkin`
|
||||||
7. Validate all code has correctly formatted and built: `docker buildx bake validate`
|
7. Push to your fork and [submit a pull request](https://github.com/crazy-max/ghaction-docker-meta/compare)
|
||||||
8. Push to your fork and [submit a pull request](https://github.com/docker/metadata-action/compare)
|
8. Pat your self on the back and wait for your pull request to be reviewed and merged.
|
||||||
9. Pat your self on the back and wait for your pull request to be reviewed and merged.
|
|
||||||
|
## Container based developer flow
|
||||||
|
|
||||||
|
If you don't want to maintain a Node developer environment that fits this project you can use containerized commands instead of invoking yarn directly.
|
||||||
|
|
||||||
|
```
|
||||||
|
# format code and build javascript artifacts
|
||||||
|
docker buildx bake pre-checkin
|
||||||
|
|
||||||
|
# validate all code has correctly formatted and built
|
||||||
|
docker buildx bake validate
|
||||||
|
|
||||||
|
# run tests
|
||||||
|
docker buildx bake test
|
||||||
|
```
|
||||||
|
|
||||||
Here are a few things you can do that will increase the likelihood of your pull request being accepted:
|
Here are a few things you can do that will increase the likelihood of your pull request being accepted:
|
||||||
|
|
||||||
@ -28,5 +41,5 @@ Here are a few things you can do that will increase the likelihood of your pull
|
|||||||
## Resources
|
## Resources
|
||||||
|
|
||||||
- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)
|
- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)
|
||||||
- [Using Pull Requests](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests)
|
- [Using Pull Requests](https://help.github.com/articles/about-pull-requests/)
|
||||||
- [GitHub Help](https://docs.github.com/en)
|
- [GitHub Help](https://help.github.com)
|
||||||
|
2
.github/FUNDING.yml
vendored
Normal file
2
.github/FUNDING.yml
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
github: crazy-max
|
||||||
|
custom: https://www.paypal.me/crazyws
|
101
.github/ISSUE_TEMPLATE/bug.yml
vendored
101
.github/ISSUE_TEMPLATE/bug.yml
vendored
@ -1,101 +0,0 @@
|
|||||||
# https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema
|
|
||||||
name: Bug Report
|
|
||||||
description: Report a bug
|
|
||||||
labels:
|
|
||||||
- status/triage
|
|
||||||
|
|
||||||
body:
|
|
||||||
- type: markdown
|
|
||||||
attributes:
|
|
||||||
value: |
|
|
||||||
Thank you for taking the time to report a bug!
|
|
||||||
If this is a security issue please report it to the [Docker Security team](mailto:security@docker.com).
|
|
||||||
|
|
||||||
- type: checkboxes
|
|
||||||
attributes:
|
|
||||||
label: Contributing guidelines
|
|
||||||
description: >
|
|
||||||
Make sure you've read the contributing guidelines before proceeding.
|
|
||||||
options:
|
|
||||||
- label: I've read the [contributing guidelines](https://github.com/docker/metadata-action/blob/master/.github/CONTRIBUTING.md) and wholeheartedly agree
|
|
||||||
required: true
|
|
||||||
|
|
||||||
- type: checkboxes
|
|
||||||
attributes:
|
|
||||||
label: "I've found a bug, and:"
|
|
||||||
description: |
|
|
||||||
Make sure that your request fulfills all of the following requirements.
|
|
||||||
If one requirement cannot be satisfied, explain in detail why.
|
|
||||||
options:
|
|
||||||
- label: The documentation does not mention anything about my problem
|
|
||||||
- label: There are no open or closed issues that are related to my problem
|
|
||||||
|
|
||||||
- type: textarea
|
|
||||||
attributes:
|
|
||||||
label: Description
|
|
||||||
description: >
|
|
||||||
Provide a brief description of the bug in 1-2 sentences.
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
|
|
||||||
- type: textarea
|
|
||||||
attributes:
|
|
||||||
label: Expected behaviour
|
|
||||||
description: >
|
|
||||||
Describe precisely what you'd expect to happen.
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
|
|
||||||
- type: textarea
|
|
||||||
attributes:
|
|
||||||
label: Actual behaviour
|
|
||||||
description: >
|
|
||||||
Describe precisely what is actually happening.
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
|
|
||||||
- type: input
|
|
||||||
attributes:
|
|
||||||
label: Repository URL
|
|
||||||
description: >
|
|
||||||
Enter the URL of the repository where you are experiencing the
|
|
||||||
issue. If your repository is private, provide a link to a minimal
|
|
||||||
repository that reproduces the issue.
|
|
||||||
|
|
||||||
- type: input
|
|
||||||
attributes:
|
|
||||||
label: Workflow run URL
|
|
||||||
description: >
|
|
||||||
Enter the URL of the GitHub Action workflow run if public (e.g.
|
|
||||||
`https://github.com/<user>/<repo>/actions/runs/<id>`)
|
|
||||||
|
|
||||||
- type: textarea
|
|
||||||
attributes:
|
|
||||||
label: YAML workflow
|
|
||||||
description: |
|
|
||||||
Provide the YAML of the workflow that's causing the issue.
|
|
||||||
Make sure to remove any sensitive information.
|
|
||||||
render: yaml
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
|
|
||||||
- type: textarea
|
|
||||||
attributes:
|
|
||||||
label: Workflow logs
|
|
||||||
description: >
|
|
||||||
[Attach](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/attaching-files)
|
|
||||||
the [log file of your workflow run](https://docs.github.com/en/actions/managing-workflow-runs/using-workflow-run-logs#downloading-logs)
|
|
||||||
and make sure to remove any sensitive information.
|
|
||||||
|
|
||||||
- type: textarea
|
|
||||||
attributes:
|
|
||||||
label: BuildKit logs
|
|
||||||
description: >
|
|
||||||
If applicable, provide the [BuildKit container logs](https://docs.docker.com/build/ci/github-actions/configure-builder/#buildkit-container-logs)
|
|
||||||
render: text
|
|
||||||
|
|
||||||
- type: textarea
|
|
||||||
attributes:
|
|
||||||
label: Additional info
|
|
||||||
description: |
|
|
||||||
Provide any additional information that could be useful.
|
|
33
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
33
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
---
|
||||||
|
name: Bug report
|
||||||
|
about: Create a report to help us improve
|
||||||
|
---
|
||||||
|
|
||||||
|
### Behaviour
|
||||||
|
|
||||||
|
#### Steps to reproduce this issue
|
||||||
|
|
||||||
|
1.
|
||||||
|
2.
|
||||||
|
3.
|
||||||
|
|
||||||
|
#### Expected behaviour
|
||||||
|
|
||||||
|
> Tell me what should happen
|
||||||
|
|
||||||
|
#### Actual behaviour
|
||||||
|
|
||||||
|
> Tell me what happens instead
|
||||||
|
|
||||||
|
### Configuration
|
||||||
|
|
||||||
|
* Repository URL (if public):
|
||||||
|
* Build URL (if public):
|
||||||
|
|
||||||
|
```yml
|
||||||
|
# paste your YAML workflow file here and remove sensitive data
|
||||||
|
```
|
||||||
|
|
||||||
|
### Logs
|
||||||
|
|
||||||
|
> Download the [log file of your build](https://help.github.com/en/actions/configuring-and-managing-workflows/managing-a-workflow-run#downloading-logs) and [attach it](https://help.github.com/en/github/managing-your-work-on-github/file-attachments-on-issues-and-pull-requests) to this issue.
|
9
.github/ISSUE_TEMPLATE/config.yml
vendored
9
.github/ISSUE_TEMPLATE/config.yml
vendored
@ -1,9 +0,0 @@
|
|||||||
# https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository#configuring-the-template-chooser
|
|
||||||
blank_issues_enabled: true
|
|
||||||
contact_links:
|
|
||||||
- name: Questions and Discussions
|
|
||||||
url: https://github.com/docker/metadata-action/discussions/new
|
|
||||||
about: Use Github Discussions to ask questions and/or open discussion topics.
|
|
||||||
- name: Documentation
|
|
||||||
url: https://docs.docker.com/build/ci/github-actions/
|
|
||||||
about: Read the documentation.
|
|
15
.github/ISSUE_TEMPLATE/feature.yml
vendored
15
.github/ISSUE_TEMPLATE/feature.yml
vendored
@ -1,15 +0,0 @@
|
|||||||
# https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema
|
|
||||||
name: Feature request
|
|
||||||
description: Missing functionality? Come tell us about it!
|
|
||||||
labels:
|
|
||||||
- kind/enhancement
|
|
||||||
- status/triage
|
|
||||||
|
|
||||||
body:
|
|
||||||
- type: textarea
|
|
||||||
id: description
|
|
||||||
attributes:
|
|
||||||
label: Description
|
|
||||||
description: What is the feature you want to see?
|
|
||||||
validations:
|
|
||||||
required: true
|
|
12
.github/SECURITY.md
vendored
12
.github/SECURITY.md
vendored
@ -1,12 +0,0 @@
|
|||||||
# Reporting security issues
|
|
||||||
|
|
||||||
The project maintainers take security seriously. If you discover a security
|
|
||||||
issue, please bring it to their attention right away!
|
|
||||||
|
|
||||||
**Please _DO NOT_ file a public issue**, instead send your report privately to
|
|
||||||
[security@docker.com](mailto:security@docker.com).
|
|
||||||
|
|
||||||
Security reports are greatly appreciated, and we will publicly thank you for it.
|
|
||||||
We also like to send gifts—if you'd like Docker swag, make sure to let
|
|
||||||
us know. We currently do not offer a paid security bounty program, but are not
|
|
||||||
ruling it out in the future.
|
|
29
.github/SUPPORT.md
vendored
Normal file
29
.github/SUPPORT.md
vendored
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
# Support [](https://isitmaintained.com/project/crazy-max/ghaction-docker-meta)
|
||||||
|
|
||||||
|
## Reporting an issue
|
||||||
|
|
||||||
|
Please do a search in [open issues](https://github.com/crazy-max/ghaction-docker-meta/issues?utf8=%E2%9C%93&q=) to see if the issue or feature request has already been filed.
|
||||||
|
|
||||||
|
If you find your issue already exists, make relevant comments and add your [reaction](https://github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments). Use a reaction in place of a "+1" comment.
|
||||||
|
|
||||||
|
:+1: - upvote
|
||||||
|
|
||||||
|
:-1: - downvote
|
||||||
|
|
||||||
|
If you cannot find an existing issue that describes your bug or feature, submit an issue using the guidelines below.
|
||||||
|
|
||||||
|
## Writing good bug reports and feature requests
|
||||||
|
|
||||||
|
File a single issue per problem and feature request.
|
||||||
|
|
||||||
|
* Do not enumerate multiple bugs or feature requests in the same issue.
|
||||||
|
* Do not add your issue as a comment to an existing issue unless it's for the identical input. Many issues look similar, but have different causes.
|
||||||
|
|
||||||
|
The more information you can provide, the more likely someone will be successful reproducing the issue and finding a fix.
|
||||||
|
|
||||||
|
You are now ready to [create a new issue](https://github.com/crazy-max/ghaction-docker-meta/issues/new/choose)!
|
||||||
|
|
||||||
|
## Closure policy
|
||||||
|
|
||||||
|
* Issues that don't have the information requested above (when applicable) will be closed immediately and the poster directed to the support guidelines.
|
||||||
|
* Issues that go a week without a response from original poster are subject to closure at my discretion.
|
13
.github/dependabot.yml
vendored
13
.github/dependabot.yml
vendored
@ -4,16 +4,19 @@ updates:
|
|||||||
directory: "/"
|
directory: "/"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "daily"
|
||||||
|
time: "06:00"
|
||||||
|
timezone: "Europe/Paris"
|
||||||
labels:
|
labels:
|
||||||
- "dependencies"
|
- ":game_die: dependencies"
|
||||||
- "bot"
|
- ":robot: bot"
|
||||||
- package-ecosystem: "npm"
|
- package-ecosystem: "npm"
|
||||||
directory: "/"
|
directory: "/"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "daily"
|
||||||
versioning-strategy: "increase"
|
time: "06:00"
|
||||||
|
timezone: "Europe/Paris"
|
||||||
allow:
|
allow:
|
||||||
- dependency-type: "production"
|
- dependency-type: "production"
|
||||||
labels:
|
labels:
|
||||||
- "dependencies"
|
- ":game_die: dependencies"
|
||||||
- "bot"
|
- ":robot: bot"
|
||||||
|
BIN
.github/ghaction-docker-meta.png
vendored
Normal file
BIN
.github/ghaction-docker-meta.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.5 KiB |
77
.github/labels.yml
vendored
Normal file
77
.github/labels.yml
vendored
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
## more info https://github.com/crazy-max/ghaction-github-labeler
|
||||||
|
- # automerge
|
||||||
|
name: ":bell: automerge"
|
||||||
|
color: "8f4fbc"
|
||||||
|
description: ""
|
||||||
|
- # bot
|
||||||
|
name: ":robot: bot"
|
||||||
|
color: "69cde9"
|
||||||
|
description: ""
|
||||||
|
- # bug
|
||||||
|
name: ":bug: bug"
|
||||||
|
color: "b60205"
|
||||||
|
description: ""
|
||||||
|
- # dependencies
|
||||||
|
name: ":game_die: dependencies"
|
||||||
|
color: "0366d6"
|
||||||
|
description: ""
|
||||||
|
- # documentation
|
||||||
|
name: ":memo: documentation"
|
||||||
|
color: "c5def5"
|
||||||
|
description: ""
|
||||||
|
- # duplicate
|
||||||
|
name: ":busts_in_silhouette: duplicate"
|
||||||
|
color: "cccccc"
|
||||||
|
description: ""
|
||||||
|
- # enhancement
|
||||||
|
name: ":sparkles: enhancement"
|
||||||
|
color: "0054ca"
|
||||||
|
description: ""
|
||||||
|
- # feature request
|
||||||
|
name: ":bulb: feature request"
|
||||||
|
color: "0e8a16"
|
||||||
|
description: ""
|
||||||
|
- # feedback
|
||||||
|
name: ":mega: feedback"
|
||||||
|
color: "03a9f4"
|
||||||
|
description: ""
|
||||||
|
- # future maybe
|
||||||
|
name: ":rocket: future maybe"
|
||||||
|
color: "fef2c0"
|
||||||
|
description: ""
|
||||||
|
- # good first issue
|
||||||
|
name: ":hatching_chick: good first issue"
|
||||||
|
color: "7057ff"
|
||||||
|
description: ""
|
||||||
|
- # help wanted
|
||||||
|
name: ":pray: help wanted"
|
||||||
|
color: "4caf50"
|
||||||
|
description: ""
|
||||||
|
- # hold
|
||||||
|
name: ":hand: hold"
|
||||||
|
color: "24292f"
|
||||||
|
description: ""
|
||||||
|
- # invalid
|
||||||
|
name: ":no_entry_sign: invalid"
|
||||||
|
color: "e6e6e6"
|
||||||
|
description: ""
|
||||||
|
- # maybe bug
|
||||||
|
name: ":interrobang: maybe bug"
|
||||||
|
color: "ff5722"
|
||||||
|
description: ""
|
||||||
|
- # needs more info
|
||||||
|
name: ":thinking: needs more info"
|
||||||
|
color: "795548"
|
||||||
|
description: ""
|
||||||
|
- # question
|
||||||
|
name: ":question: question"
|
||||||
|
color: "3f51b5"
|
||||||
|
description: ""
|
||||||
|
- # upstream
|
||||||
|
name: ":eyes: upstream"
|
||||||
|
color: "fbca04"
|
||||||
|
description: ""
|
||||||
|
- # wontfix
|
||||||
|
name: ":coffin: wontfix"
|
||||||
|
color: "ffffff"
|
||||||
|
description: ""
|
BIN
.github/metadata-action.png
vendored
BIN
.github/metadata-action.png
vendored
Binary file not shown.
Before Width: | Height: | Size: 7.5 KiB |
18
.github/stale.yml
vendored
Normal file
18
.github/stale.yml
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# Number of days of inactivity before an issue becomes stale
|
||||||
|
daysUntilStale: 30
|
||||||
|
# Number of days of inactivity before a stale issue is closed
|
||||||
|
daysUntilClose: 7
|
||||||
|
# Issues with these labels will never be considered stale
|
||||||
|
exemptLabels:
|
||||||
|
- ":hand: hold"
|
||||||
|
# Set to true to ignore issues in a milestone (defaults to false)
|
||||||
|
exemptMilestones: true
|
||||||
|
# Label to use when marking an issue as stale
|
||||||
|
staleLabel: ":skull: stale"
|
||||||
|
# Comment to post when marking an issue as stale. Set to `false` to disable
|
||||||
|
markComment: >
|
||||||
|
This issue has been automatically marked as stale because it has not had
|
||||||
|
recent activity. It will be closed if no further activity occurs. Thank you
|
||||||
|
for your contributions.
|
||||||
|
# Comment to post when closing a stale issue. Set to `false` to disable
|
||||||
|
closeComment: false
|
561
.github/workflows/ci.yml
vendored
561
.github/workflows/ci.yml
vendored
@ -1,55 +1,25 @@
|
|||||||
name: ci
|
name: ci
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 10 * * *'
|
- cron: '0 */4 * * *' # every 4 hours
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- 'master'
|
- '**'
|
||||||
- 'releases/v*'
|
|
||||||
tags:
|
tags:
|
||||||
- 'v*.*.*'
|
- 'v*.*.*'
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DOCKER_IMAGE: localhost:5000/name/app
|
DOCKER_IMAGE: localhost:5000/name/app
|
||||||
BUILDX_VERSION: latest
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
context:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
context:
|
|
||||||
- workflow
|
|
||||||
- git
|
|
||||||
steps:
|
|
||||||
-
|
|
||||||
name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
-
|
|
||||||
name: Docker meta
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
context: ${{ matrix.context }}
|
|
||||||
|
|
||||||
multi-images:
|
multi-images:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v2.3.3
|
||||||
-
|
|
||||||
name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
with:
|
|
||||||
version: ${{ env.BUILDX_VERSION }}
|
|
||||||
driver: docker
|
|
||||||
-
|
-
|
||||||
name: Docker meta
|
name: Docker meta
|
||||||
uses: ./
|
uses: ./
|
||||||
@ -57,15 +27,7 @@ jobs:
|
|||||||
images: |
|
images: |
|
||||||
${{ env.DOCKER_IMAGE }}
|
${{ env.DOCKER_IMAGE }}
|
||||||
ghcr.io/name/app
|
ghcr.io/name/app
|
||||||
tags: |
|
tag-sha: true
|
||||||
type=schedule
|
|
||||||
type=ref,event=branch
|
|
||||||
type=ref,event=tag
|
|
||||||
type=ref,event=pr
|
|
||||||
type=sha
|
|
||||||
-
|
|
||||||
name: Print envs
|
|
||||||
run: env|sort
|
|
||||||
|
|
||||||
tag-schedule:
|
tag-schedule:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -80,13 +42,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v2.3.3
|
||||||
-
|
|
||||||
name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
with:
|
|
||||||
version: ${{ env.BUILDX_VERSION }}
|
|
||||||
driver: docker
|
|
||||||
-
|
-
|
||||||
name: Docker meta
|
name: Docker meta
|
||||||
uses: ./
|
uses: ./
|
||||||
@ -94,35 +50,22 @@ jobs:
|
|||||||
images: |
|
images: |
|
||||||
${{ env.DOCKER_IMAGE }}
|
${{ env.DOCKER_IMAGE }}
|
||||||
ghcr.io/name/app
|
ghcr.io/name/app
|
||||||
tags: |
|
tag-sha: true
|
||||||
type=schedule,pattern=${{ matrix.tag-schedule }}
|
tag-schedule: ${{ matrix.tag-schedule }}
|
||||||
type=ref,event=branch
|
|
||||||
type=ref,event=tag
|
|
||||||
type=ref,event=pr
|
|
||||||
type=sha
|
|
||||||
|
|
||||||
tag-match:
|
coerce:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
tag-coerce-tag:
|
||||||
- tag-match: '\d.\d.\d'
|
- "{{raw}}"
|
||||||
tag-match-group: '0'
|
- "{{major}}.{{minor}}"
|
||||||
- tag-match: '\d.\d'
|
- "{{patch}}"
|
||||||
tag-match-group: '0'
|
|
||||||
- tag-match: 'v(.*)'
|
|
||||||
tag-match-group: '1'
|
|
||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v2.3.3
|
||||||
-
|
|
||||||
name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
with:
|
|
||||||
version: ${{ env.BUILDX_VERSION }}
|
|
||||||
driver: docker
|
|
||||||
-
|
-
|
||||||
name: Docker meta
|
name: Docker meta
|
||||||
uses: ./
|
uses: ./
|
||||||
@ -130,184 +73,8 @@ jobs:
|
|||||||
images: |
|
images: |
|
||||||
${{ env.DOCKER_IMAGE }}
|
${{ env.DOCKER_IMAGE }}
|
||||||
ghcr.io/name/app
|
ghcr.io/name/app
|
||||||
tags: |
|
tag-coerce-tag: ${{ matrix.tag-coerce-tag }}
|
||||||
type=schedule
|
tag-sha: true
|
||||||
type=ref,event=branch
|
|
||||||
type=ref,event=tag
|
|
||||||
type=ref,event=pr
|
|
||||||
type=match,"pattern=${{ matrix.tag-match }}",group=${{ matrix.tag-match-group }}
|
|
||||||
type=sha
|
|
||||||
|
|
||||||
tag-semver:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
flavor-latest:
|
|
||||||
- "auto"
|
|
||||||
- "true"
|
|
||||||
- "false"
|
|
||||||
steps:
|
|
||||||
-
|
|
||||||
name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
-
|
|
||||||
name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
with:
|
|
||||||
version: ${{ env.BUILDX_VERSION }}
|
|
||||||
driver: docker
|
|
||||||
-
|
|
||||||
name: Docker meta
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
images: |
|
|
||||||
${{ env.DOCKER_IMAGE }}
|
|
||||||
ghcr.io/name/app
|
|
||||||
tags: |
|
|
||||||
type=schedule
|
|
||||||
type=ref,event=branch
|
|
||||||
type=ref,event=tag
|
|
||||||
type=ref,event=pr
|
|
||||||
type=semver,pattern={{raw}}
|
|
||||||
type=semver,pattern={{version}}
|
|
||||||
type=semver,pattern={{major}}.{{minor}}.{{patch}}
|
|
||||||
type=sha
|
|
||||||
flavor: |
|
|
||||||
latest=${{ matrix.flavor-latest }}
|
|
||||||
|
|
||||||
flavor:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
-
|
|
||||||
name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
-
|
|
||||||
name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
with:
|
|
||||||
version: ${{ env.BUILDX_VERSION }}
|
|
||||||
driver: docker
|
|
||||||
-
|
|
||||||
name: Docker meta
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
images: |
|
|
||||||
${{ env.DOCKER_IMAGE }}
|
|
||||||
ghcr.io/name/app
|
|
||||||
flavor: |
|
|
||||||
prefix=foo-
|
|
||||||
suffix=-bar
|
|
||||||
|
|
||||||
images:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
-
|
|
||||||
name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
-
|
|
||||||
name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
with:
|
|
||||||
version: ${{ env.BUILDX_VERSION }}
|
|
||||||
driver: docker
|
|
||||||
-
|
|
||||||
name: Docker meta
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
images: |
|
|
||||||
name=${{ env.DOCKER_IMAGE }}
|
|
||||||
name=ghcr.io/name/app,enable=${{ github.event_name == 'pull_request' }}
|
|
||||||
name=ghcr.io/name/release,enable=${{ startsWith(github.ref, 'refs/tags/') }}
|
|
||||||
|
|
||||||
custom-labels-annotations:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
-
|
|
||||||
name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
-
|
|
||||||
name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
with:
|
|
||||||
version: ${{ env.BUILDX_VERSION }}
|
|
||||||
driver: docker
|
|
||||||
-
|
|
||||||
name: Docker meta
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
images: |
|
|
||||||
${{ env.DOCKER_IMAGE }}
|
|
||||||
ghcr.io/name/app
|
|
||||||
labels: |
|
|
||||||
maintainer=CrazyMax
|
|
||||||
org.opencontainers.image.title=MyCustomTitle
|
|
||||||
org.opencontainers.image.description=this is a "good" example
|
|
||||||
org.opencontainers.image.vendor=MyCompany
|
|
||||||
annotations: |
|
|
||||||
maintainer=Foo
|
|
||||||
org.opencontainers.image.title=MyFooTitle
|
|
||||||
org.opencontainers.image.description=this is a "foo" example
|
|
||||||
org.opencontainers.image.vendor=MyFooCompany
|
|
||||||
|
|
||||||
global-exps:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
-
|
|
||||||
name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
-
|
|
||||||
name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
with:
|
|
||||||
version: ${{ env.BUILDX_VERSION }}
|
|
||||||
driver: docker
|
|
||||||
-
|
|
||||||
name: Docker meta
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
images: |
|
|
||||||
${{ env.DOCKER_IMAGE }}
|
|
||||||
ghcr.io/name/app
|
|
||||||
labels: |
|
|
||||||
org.opencontainers.image.created={{commit_date 'YYYY-MM-DDTHH:mm:ss.SSS[Z]'}}
|
|
||||||
tags: |
|
|
||||||
type=sha
|
|
||||||
type=raw,value=gexp-branch-{{branch}}
|
|
||||||
type=raw,value=gexp-date-{{date 'YYYYMMDD'}}
|
|
||||||
type=raw,value=gexp-tag-{{tag}}
|
|
||||||
type=raw,value=gexp-baseref-{{base_ref}}
|
|
||||||
type=raw,value=gexp-defbranch,enable={{is_default_branch}}
|
|
||||||
|
|
||||||
json:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
-
|
|
||||||
name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
-
|
|
||||||
name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
with:
|
|
||||||
version: ${{ env.BUILDX_VERSION }}
|
|
||||||
driver: docker
|
|
||||||
-
|
|
||||||
name: Docker meta
|
|
||||||
id: meta
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
images: |
|
|
||||||
${{ env.DOCKER_IMAGE }}
|
|
||||||
ghcr.io/name/app
|
|
||||||
labels: |
|
|
||||||
maintainer=CrazyMax
|
|
||||||
-
|
|
||||||
name: JSON output
|
|
||||||
run: |
|
|
||||||
echo "maintainer=${{ fromJSON(steps.meta.outputs.json).labels['maintainer'] }}"
|
|
||||||
echo "version=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}"
|
|
||||||
echo "revision=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}"
|
|
||||||
echo "created=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}"
|
|
||||||
|
|
||||||
docker-push:
|
docker-push:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -319,13 +86,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v2.3.3
|
||||||
-
|
|
||||||
name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
with:
|
|
||||||
version: ${{ env.BUILDX_VERSION }}
|
|
||||||
driver-opts: network=host
|
|
||||||
-
|
-
|
||||||
name: Docker meta
|
name: Docker meta
|
||||||
id: docker_meta
|
id: docker_meta
|
||||||
@ -333,18 +94,18 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
images: |
|
images: |
|
||||||
${{ env.DOCKER_IMAGE }}
|
${{ env.DOCKER_IMAGE }}
|
||||||
tags: |
|
tag-sha: true
|
||||||
type=schedule
|
-
|
||||||
type=ref,event=branch
|
name: Set up QEMU
|
||||||
type=ref,event=tag
|
uses: docker/setup-qemu-action@v1
|
||||||
type=ref,event=pr
|
-
|
||||||
type=semver,pattern=v{{version}}
|
name: Set up Docker Buildx
|
||||||
type=semver,pattern=v{{major}}.{{minor}}
|
uses: docker/setup-buildx-action@v1
|
||||||
type=semver,pattern=v{{major}}
|
with:
|
||||||
type=sha
|
driver-opts: network=host
|
||||||
-
|
-
|
||||||
name: Build and push to local registry
|
name: Build and push to local registry
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
context: ./test
|
context: ./test
|
||||||
file: ./test/Dockerfile
|
file: ./test/Dockerfile
|
||||||
@ -361,273 +122,7 @@ jobs:
|
|||||||
name: Check manifest
|
name: Check manifest
|
||||||
run: |
|
run: |
|
||||||
docker buildx imagetools inspect ${{ env.DOCKER_IMAGE }}:${{ steps.docker_meta.outputs.version }}
|
docker buildx imagetools inspect ${{ env.DOCKER_IMAGE }}:${{ steps.docker_meta.outputs.version }}
|
||||||
|
|
||||||
bake:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
-
|
|
||||||
name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
-
|
|
||||||
name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
with:
|
|
||||||
version: ${{ env.BUILDX_VERSION }}
|
|
||||||
-
|
|
||||||
name: Docker meta
|
|
||||||
id: docker_meta
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
images: |
|
|
||||||
${{ env.DOCKER_IMAGE }}
|
|
||||||
ghcr.io/name/app
|
|
||||||
tags: |
|
|
||||||
type=schedule
|
|
||||||
type=ref,event=branch
|
|
||||||
type=ref,event=tag
|
|
||||||
type=ref,event=pr
|
|
||||||
type=semver,pattern={{version}}
|
|
||||||
type=semver,pattern={{major}}.{{minor}}
|
|
||||||
type=semver,pattern={{major}}
|
|
||||||
type=sha
|
|
||||||
-
|
|
||||||
name: Build
|
|
||||||
uses: docker/bake-action@v6
|
|
||||||
with:
|
|
||||||
files: |
|
|
||||||
./test/docker-bake.hcl
|
|
||||||
cwd://${{ steps.docker_meta.outputs.bake-file-tags }}
|
|
||||||
cwd://${{ steps.docker_meta.outputs.bake-file-labels }}
|
|
||||||
targets: |
|
|
||||||
release
|
|
||||||
|
|
||||||
sep-tags:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
sep:
|
|
||||||
- " "
|
|
||||||
- ","
|
|
||||||
steps:
|
|
||||||
-
|
|
||||||
name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
-
|
|
||||||
name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
with:
|
|
||||||
version: ${{ env.BUILDX_VERSION }}
|
|
||||||
driver: docker
|
|
||||||
-
|
|
||||||
name: Docker meta
|
|
||||||
id: meta
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
images: |
|
|
||||||
${{ env.DOCKER_IMAGE }}
|
|
||||||
ghcr.io/name/app
|
|
||||||
sep-tags: ${{ matrix.sep }}
|
|
||||||
-
|
|
||||||
name: Tags
|
|
||||||
uses: actions/github-script@v7
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
console.log(`${{ steps.meta.outputs.tags }}`);
|
|
||||||
|
|
||||||
output-env:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
-
|
|
||||||
name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
-
|
|
||||||
name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
with:
|
|
||||||
version: ${{ env.BUILDX_VERSION }}
|
|
||||||
driver: docker
|
|
||||||
-
|
|
||||||
name: Docker meta
|
|
||||||
id: meta
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
images: |
|
|
||||||
${{ env.DOCKER_IMAGE }}
|
|
||||||
ghcr.io/name/app
|
|
||||||
labels: |
|
|
||||||
maintainer=CrazyMax
|
|
||||||
annotations: |
|
|
||||||
maintainer=Foo
|
|
||||||
-
|
|
||||||
name: Build
|
|
||||||
uses: docker/build-push-action@v6
|
|
||||||
with:
|
|
||||||
context: ./test
|
|
||||||
file: ./test/output.Dockerfile
|
|
||||||
build-args: |
|
|
||||||
DOCKER_METADATA_OUTPUT_VERSION
|
|
||||||
DOCKER_METADATA_OUTPUT_TAGS
|
|
||||||
DOCKER_METADATA_OUTPUT_LABELS
|
|
||||||
DOCKER_METADATA_OUTPUT_ANNOTATIONS
|
|
||||||
DOCKER_METADATA_OUTPUT_JSON
|
|
||||||
|
|
||||||
no-output-env:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
env:
|
|
||||||
DOCKER_METADATA_SET_OUTPUT_ENV: false
|
|
||||||
steps:
|
|
||||||
-
|
|
||||||
name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
-
|
|
||||||
name: Docker meta
|
|
||||||
id: meta
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
images: |
|
|
||||||
${{ env.DOCKER_IMAGE }}
|
|
||||||
ghcr.io/name/app
|
|
||||||
labels: |
|
|
||||||
maintainer=CrazyMax
|
|
||||||
annotations: |
|
|
||||||
maintainer=Foo
|
|
||||||
-
|
|
||||||
name: No output environment variables set
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
[[ "$(printenv | grep "^DOCKER_METADATA_OUTPUT_" | wc -l)" -eq 0 ]] || exit 1
|
|
||||||
|
|
||||||
bake-annotations:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
-
|
|
||||||
name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
-
|
|
||||||
name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
with:
|
|
||||||
version: ${{ env.BUILDX_VERSION }}
|
|
||||||
-
|
|
||||||
name: Docker meta
|
|
||||||
id: docker_meta
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
images: |
|
|
||||||
${{ env.DOCKER_IMAGE }}
|
|
||||||
ghcr.io/name/app
|
|
||||||
tags: |
|
|
||||||
type=schedule
|
|
||||||
type=ref,event=branch
|
|
||||||
type=ref,event=tag
|
|
||||||
type=ref,event=pr
|
|
||||||
type=semver,pattern={{version}}
|
|
||||||
type=semver,pattern={{major}}.{{minor}}
|
|
||||||
type=semver,pattern={{major}}
|
|
||||||
type=sha
|
|
||||||
env:
|
|
||||||
DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index
|
|
||||||
-
|
|
||||||
name: Build
|
|
||||||
uses: docker/bake-action@v6
|
|
||||||
with:
|
|
||||||
files: |
|
|
||||||
./test/docker-bake.hcl
|
|
||||||
cwd://${{ steps.docker_meta.outputs.bake-file-tags }}
|
|
||||||
cwd://${{ steps.docker_meta.outputs.bake-file-annotations }}
|
|
||||||
targets: |
|
|
||||||
release
|
|
||||||
|
|
||||||
no-images:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
-
|
|
||||||
name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
-
|
|
||||||
name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
with:
|
|
||||||
version: ${{ env.BUILDX_VERSION }}
|
|
||||||
driver: docker
|
|
||||||
-
|
|
||||||
name: Docker meta
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
tags: |
|
|
||||||
type=schedule
|
|
||||||
type=ref,event=branch
|
|
||||||
type=ref,event=tag
|
|
||||||
type=ref,event=pr
|
|
||||||
type=sha
|
|
||||||
-
|
|
||||||
name: Print envs
|
|
||||||
run: env|sort
|
|
||||||
|
|
||||||
bake-path-context:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
-
|
|
||||||
name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
-
|
|
||||||
name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
with:
|
|
||||||
version: latest
|
|
||||||
-
|
|
||||||
name: Docker meta
|
|
||||||
id: docker_meta
|
|
||||||
uses: ./
|
|
||||||
-
|
|
||||||
name: Build
|
|
||||||
uses: docker/bake-action@v6
|
|
||||||
with:
|
|
||||||
source: .
|
|
||||||
files: |
|
|
||||||
./test/docker-bake.hcl
|
|
||||||
${{ steps.docker_meta.outputs.bake-file-tags }}
|
|
||||||
${{ steps.docker_meta.outputs.bake-file-labels }}
|
|
||||||
targets: |
|
|
||||||
release
|
|
||||||
|
|
||||||
sha-short:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
short-length:
|
|
||||||
- ''
|
|
||||||
- 16
|
|
||||||
steps:
|
|
||||||
-
|
|
||||||
name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
-
|
|
||||||
name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
with:
|
|
||||||
version: ${{ env.BUILDX_VERSION }}
|
|
||||||
driver: docker
|
|
||||||
-
|
|
||||||
name: Docker meta
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
images: |
|
|
||||||
${{ env.DOCKER_IMAGE }}
|
|
||||||
ghcr.io/name/app
|
|
||||||
tags: |
|
|
||||||
type=sha
|
|
||||||
env:
|
|
||||||
DOCKER_METADATA_SHORT_SHA_LENGTH: ${{ matrix.short-length }}
|
|
||||||
|
|
||||||
dump:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
-
|
|
||||||
name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
-
|
-
|
||||||
name: Dump context
|
name: Dump context
|
||||||
uses: crazy-max/ghaction-dump-context@v2
|
if: always()
|
||||||
|
uses: crazy-max/ghaction-dump-context@v1
|
||||||
|
20
.github/workflows/labels.yml
vendored
Normal file
20
.github/workflows/labels.yml
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
name: labels
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 'master'
|
||||||
|
paths:
|
||||||
|
- '.github/labels.yml'
|
||||||
|
- '.github/workflows/labels.yml'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
labeler:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
name: Checkout
|
||||||
|
uses: actions/checkout@v2.3.3
|
||||||
|
-
|
||||||
|
name: Run Labeler
|
||||||
|
uses: crazy-max/ghaction-github-labeler@v3.1.0
|
21
.github/workflows/publish.yml
vendored
21
.github/workflows/publish.yml
vendored
@ -1,21 +0,0 @@
|
|||||||
name: publish
|
|
||||||
|
|
||||||
on:
|
|
||||||
release:
|
|
||||||
types:
|
|
||||||
- published
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
publish:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
id-token: write
|
|
||||||
packages: write
|
|
||||||
steps:
|
|
||||||
-
|
|
||||||
name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
-
|
|
||||||
name: Publish
|
|
||||||
uses: actions/publish-immutable-action@v0.0.4
|
|
36
.github/workflows/test.yml
vendored
36
.github/workflows/test.yml
vendored
@ -1,28 +1,46 @@
|
|||||||
name: test
|
name: test
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- 'master'
|
- 'master'
|
||||||
- 'releases/v*'
|
- 'releases/v*'
|
||||||
|
paths-ignore:
|
||||||
|
- '**.md'
|
||||||
pull_request:
|
pull_request:
|
||||||
|
paths-ignore:
|
||||||
|
- '**.md'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
test-containerized:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
name: Checkout
|
||||||
|
uses: actions/checkout@v2.3.3
|
||||||
|
-
|
||||||
|
name: Validate
|
||||||
|
run: docker buildx bake validate
|
||||||
|
-
|
||||||
|
name: Test
|
||||||
|
run: docker buildx bake test
|
||||||
|
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
-
|
||||||
|
name: Checkout
|
||||||
|
uses: actions/checkout@v2.3.3
|
||||||
|
-
|
||||||
|
name: Install
|
||||||
|
run: yarn install
|
||||||
-
|
-
|
||||||
name: Test
|
name: Test
|
||||||
uses: docker/bake-action@v6
|
run: yarn run test
|
||||||
with:
|
|
||||||
targets: test
|
|
||||||
-
|
-
|
||||||
name: Upload coverage
|
name: Upload coverage
|
||||||
uses: codecov/codecov-action@v5
|
uses: codecov/codecov-action@v1.0.14
|
||||||
|
if: success()
|
||||||
with:
|
with:
|
||||||
file: ./coverage/clover.xml
|
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
file: ./coverage/clover.xml
|
||||||
|
43
.github/workflows/validate.yml
vendored
43
.github/workflows/validate.yml
vendored
@ -1,43 +0,0 @@
|
|||||||
name: validate
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- 'master'
|
|
||||||
- 'releases/v*'
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
prepare:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
outputs:
|
|
||||||
targets: ${{ steps.generate.outputs.targets }}
|
|
||||||
steps:
|
|
||||||
-
|
|
||||||
name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
-
|
|
||||||
name: List targets
|
|
||||||
id: generate
|
|
||||||
uses: docker/bake-action/subaction/list-targets@v6
|
|
||||||
with:
|
|
||||||
target: validate
|
|
||||||
|
|
||||||
validate:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs:
|
|
||||||
- prepare
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
target: ${{ fromJson(needs.prepare.outputs.targets) }}
|
|
||||||
steps:
|
|
||||||
-
|
|
||||||
name: Validate
|
|
||||||
uses: docker/bake-action@v6
|
|
||||||
with:
|
|
||||||
targets: ${{ matrix.target }}
|
|
71
.gitignore
vendored
71
.gitignore
vendored
@ -1,5 +1,12 @@
|
|||||||
# https://raw.githubusercontent.com/github/gitignore/main/Node.gitignore
|
/.dev
|
||||||
|
node_modules/
|
||||||
|
lib
|
||||||
|
|
||||||
|
# Jetbrains
|
||||||
|
/.idea
|
||||||
|
/*.iml
|
||||||
|
|
||||||
|
# Rest of the file pulled from https://github.com/github/gitignore/blob/master/Node.gitignore
|
||||||
# Logs
|
# Logs
|
||||||
logs
|
logs
|
||||||
*.log
|
*.log
|
||||||
@ -7,7 +14,6 @@ npm-debug.log*
|
|||||||
yarn-debug.log*
|
yarn-debug.log*
|
||||||
yarn-error.log*
|
yarn-error.log*
|
||||||
lerna-debug.log*
|
lerna-debug.log*
|
||||||
.pnpm-debug.log*
|
|
||||||
|
|
||||||
# Diagnostic reports (https://nodejs.org/api/report.html)
|
# Diagnostic reports (https://nodejs.org/api/report.html)
|
||||||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
||||||
@ -18,14 +24,34 @@ pids
|
|||||||
*.seed
|
*.seed
|
||||||
*.pid.lock
|
*.pid.lock
|
||||||
|
|
||||||
|
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||||
|
lib-cov
|
||||||
|
|
||||||
# Coverage directory used by tools like istanbul
|
# Coverage directory used by tools like istanbul
|
||||||
coverage
|
coverage
|
||||||
*.lcov
|
*.lcov
|
||||||
|
|
||||||
|
# nyc test coverage
|
||||||
|
.nyc_output
|
||||||
|
|
||||||
|
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
||||||
|
.grunt
|
||||||
|
|
||||||
|
# Bower dependency directory (https://bower.io/)
|
||||||
|
bower_components
|
||||||
|
|
||||||
|
# node-waf configuration
|
||||||
|
.lock-wscript
|
||||||
|
|
||||||
|
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
||||||
|
build/Release
|
||||||
|
|
||||||
# Dependency directories
|
# Dependency directories
|
||||||
node_modules/
|
|
||||||
jspm_packages/
|
jspm_packages/
|
||||||
|
|
||||||
|
# TypeScript v1 declaration files
|
||||||
|
typings/
|
||||||
|
|
||||||
# TypeScript cache
|
# TypeScript cache
|
||||||
*.tsbuildinfo
|
*.tsbuildinfo
|
||||||
|
|
||||||
@ -35,19 +61,36 @@ jspm_packages/
|
|||||||
# Optional eslint cache
|
# Optional eslint cache
|
||||||
.eslintcache
|
.eslintcache
|
||||||
|
|
||||||
|
# Optional REPL history
|
||||||
|
.node_repl_history
|
||||||
|
|
||||||
|
# Output of 'npm pack'
|
||||||
|
*.tgz
|
||||||
|
|
||||||
# Yarn Integrity file
|
# Yarn Integrity file
|
||||||
.yarn-integrity
|
.yarn-integrity
|
||||||
|
|
||||||
# dotenv environment variable files
|
# dotenv environment variables file
|
||||||
.env
|
.env
|
||||||
.env.development.local
|
.env.test
|
||||||
.env.test.local
|
|
||||||
.env.production.local
|
|
||||||
.env.local
|
|
||||||
|
|
||||||
# yarn v2
|
# parcel-bundler cache (https://parceljs.org/)
|
||||||
.yarn/cache
|
.cache
|
||||||
.yarn/unplugged
|
|
||||||
.yarn/build-state.yml
|
# next.js build output
|
||||||
.yarn/install-state.gz
|
.next
|
||||||
.pnp.*
|
|
||||||
|
# nuxt.js build output
|
||||||
|
.nuxt
|
||||||
|
|
||||||
|
# vuepress build output
|
||||||
|
.vuepress/dist
|
||||||
|
|
||||||
|
# Serverless directories
|
||||||
|
.serverless/
|
||||||
|
|
||||||
|
# FuseBox cache
|
||||||
|
.fusebox/
|
||||||
|
|
||||||
|
# DynamoDB Local files
|
||||||
|
.dynamodb/
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
# Dependency directories
|
|
||||||
node_modules/
|
|
||||||
jspm_packages/
|
|
||||||
|
|
||||||
# yarn v2
|
|
||||||
.yarn/
|
|
541
.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
vendored
541
.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
vendored
File diff suppressed because one or more lines are too long
13
.yarnrc.yml
13
.yarnrc.yml
@ -1,13 +0,0 @@
|
|||||||
logFilters:
|
|
||||||
- code: YN0013
|
|
||||||
level: discard
|
|
||||||
- code: YN0019
|
|
||||||
level: discard
|
|
||||||
- code: YN0076
|
|
||||||
level: discard
|
|
||||||
|
|
||||||
nodeLinker: node-modules
|
|
||||||
|
|
||||||
plugins:
|
|
||||||
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
|
|
||||||
spec: "@yarnpkg/plugin-interactive-tools"
|
|
18
CHANGELOG.md
Normal file
18
CHANGELOG.md
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# Changelog
|
||||||
|
|
||||||
|
## 1.3.0 (2020/10/26)
|
||||||
|
|
||||||
|
* Set latest tag only if matches with a pattern
|
||||||
|
|
||||||
|
## 1.2.0 (2020/10/26)
|
||||||
|
|
||||||
|
* Coerces Git tag to semver (#3)
|
||||||
|
|
||||||
|
## 1.1.0 (2020/10/25)
|
||||||
|
|
||||||
|
* Allow to templatize schedule tag (#1)
|
||||||
|
* Allow to disable edge branch tagging (#2)
|
||||||
|
|
||||||
|
## 1.0.0 (2020/10/25)
|
||||||
|
|
||||||
|
* Initial version
|
42
Dockerfile
Normal file
42
Dockerfile
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
#syntax=docker/dockerfile:1.1-experimental
|
||||||
|
|
||||||
|
FROM node:12 AS deps
|
||||||
|
WORKDIR /src
|
||||||
|
COPY package.json yarn.lock ./
|
||||||
|
RUN --mount=type=cache,target=/usr/local/share/.cache/yarn \
|
||||||
|
yarn install
|
||||||
|
|
||||||
|
FROM scratch AS update-yarn
|
||||||
|
COPY --from=deps /src/yarn.lock /
|
||||||
|
|
||||||
|
FROM deps AS validate-yarn
|
||||||
|
COPY .git .git
|
||||||
|
RUN status=$(git status --porcelain -- yarn.lock); if [ -n "$status" ]; then echo $status; exit 1; fi
|
||||||
|
|
||||||
|
FROM deps AS base
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
FROM base AS build
|
||||||
|
RUN yarn build
|
||||||
|
|
||||||
|
FROM deps AS test
|
||||||
|
COPY . .
|
||||||
|
RUN yarn run test
|
||||||
|
|
||||||
|
FROM base AS run-format
|
||||||
|
RUN yarn run format
|
||||||
|
|
||||||
|
FROM scratch AS format
|
||||||
|
COPY --from=run-format /src/src/*.ts /src/
|
||||||
|
|
||||||
|
FROM base AS validate-format
|
||||||
|
RUN yarn run format-check
|
||||||
|
|
||||||
|
FROM scratch AS dist
|
||||||
|
COPY --from=build /src/dist/ /dist/
|
||||||
|
|
||||||
|
FROM build AS validate-build
|
||||||
|
RUN status=$(git status --porcelain -- dist); if [ -n "$status" ]; then echo $status; exit 1; fi
|
||||||
|
|
||||||
|
FROM base AS dev
|
||||||
|
ENTRYPOINT ["bash"]
|
204
LICENSE
204
LICENSE
@ -1,191 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
Apache License
|
Copyright (c) 2020 CrazyMax
|
||||||
Version 2.0, January 2004
|
|
||||||
https://www.apache.org/licenses/
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
1. Definitions.
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
"License" shall mean the terms and conditions for use, reproduction,
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
and distribution as defined by Sections 1 through 9 of this document.
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
"Licensor" shall mean the copyright owner or entity authorized by
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
the copyright owner that is granting the License.
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
"Legal Entity" shall mean the union of the acting entity and all
|
SOFTWARE.
|
||||||
other entities that control, are controlled by, or are under common
|
|
||||||
control with that entity. For the purposes of this definition,
|
|
||||||
"control" means (i) the power, direct or indirect, to cause the
|
|
||||||
direction or management of such entity, whether by contract or
|
|
||||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
||||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
||||||
|
|
||||||
"You" (or "Your") shall mean an individual or Legal Entity
|
|
||||||
exercising permissions granted by this License.
|
|
||||||
|
|
||||||
"Source" form shall mean the preferred form for making modifications,
|
|
||||||
including but not limited to software source code, documentation
|
|
||||||
source, and configuration files.
|
|
||||||
|
|
||||||
"Object" form shall mean any form resulting from mechanical
|
|
||||||
transformation or translation of a Source form, including but
|
|
||||||
not limited to compiled object code, generated documentation,
|
|
||||||
and conversions to other media types.
|
|
||||||
|
|
||||||
"Work" shall mean the work of authorship, whether in Source or
|
|
||||||
Object form, made available under the License, as indicated by a
|
|
||||||
copyright notice that is included in or attached to the work
|
|
||||||
(an example is provided in the Appendix below).
|
|
||||||
|
|
||||||
"Derivative Works" shall mean any work, whether in Source or Object
|
|
||||||
form, that is based on (or derived from) the Work and for which the
|
|
||||||
editorial revisions, annotations, elaborations, or other modifications
|
|
||||||
represent, as a whole, an original work of authorship. For the purposes
|
|
||||||
of this License, Derivative Works shall not include works that remain
|
|
||||||
separable from, or merely link (or bind by name) to the interfaces of,
|
|
||||||
the Work and Derivative Works thereof.
|
|
||||||
|
|
||||||
"Contribution" shall mean any work of authorship, including
|
|
||||||
the original version of the Work and any modifications or additions
|
|
||||||
to that Work or Derivative Works thereof, that is intentionally
|
|
||||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
||||||
or by an individual or Legal Entity authorized to submit on behalf of
|
|
||||||
the copyright owner. For the purposes of this definition, "submitted"
|
|
||||||
means any form of electronic, verbal, or written communication sent
|
|
||||||
to the Licensor or its representatives, including but not limited to
|
|
||||||
communication on electronic mailing lists, source code control systems,
|
|
||||||
and issue tracking systems that are managed by, or on behalf of, the
|
|
||||||
Licensor for the purpose of discussing and improving the Work, but
|
|
||||||
excluding communication that is conspicuously marked or otherwise
|
|
||||||
designated in writing by the copyright owner as "Not a Contribution."
|
|
||||||
|
|
||||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
||||||
on behalf of whom a Contribution has been received by Licensor and
|
|
||||||
subsequently incorporated within the Work.
|
|
||||||
|
|
||||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
copyright license to reproduce, prepare Derivative Works of,
|
|
||||||
publicly display, publicly perform, sublicense, and distribute the
|
|
||||||
Work and such Derivative Works in Source or Object form.
|
|
||||||
|
|
||||||
3. Grant of Patent License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
(except as stated in this section) patent license to make, have made,
|
|
||||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
||||||
where such license applies only to those patent claims licensable
|
|
||||||
by such Contributor that are necessarily infringed by their
|
|
||||||
Contribution(s) alone or by combination of their Contribution(s)
|
|
||||||
with the Work to which such Contribution(s) was submitted. If You
|
|
||||||
institute patent litigation against any entity (including a
|
|
||||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
||||||
or a Contribution incorporated within the Work constitutes direct
|
|
||||||
or contributory patent infringement, then any patent licenses
|
|
||||||
granted to You under this License for that Work shall terminate
|
|
||||||
as of the date such litigation is filed.
|
|
||||||
|
|
||||||
4. Redistribution. You may reproduce and distribute copies of the
|
|
||||||
Work or Derivative Works thereof in any medium, with or without
|
|
||||||
modifications, and in Source or Object form, provided that You
|
|
||||||
meet the following conditions:
|
|
||||||
|
|
||||||
(a) You must give any other recipients of the Work or
|
|
||||||
Derivative Works a copy of this License; and
|
|
||||||
|
|
||||||
(b) You must cause any modified files to carry prominent notices
|
|
||||||
stating that You changed the files; and
|
|
||||||
|
|
||||||
(c) You must retain, in the Source form of any Derivative Works
|
|
||||||
that You distribute, all copyright, patent, trademark, and
|
|
||||||
attribution notices from the Source form of the Work,
|
|
||||||
excluding those notices that do not pertain to any part of
|
|
||||||
the Derivative Works; and
|
|
||||||
|
|
||||||
(d) If the Work includes a "NOTICE" text file as part of its
|
|
||||||
distribution, then any Derivative Works that You distribute must
|
|
||||||
include a readable copy of the attribution notices contained
|
|
||||||
within such NOTICE file, excluding those notices that do not
|
|
||||||
pertain to any part of the Derivative Works, in at least one
|
|
||||||
of the following places: within a NOTICE text file distributed
|
|
||||||
as part of the Derivative Works; within the Source form or
|
|
||||||
documentation, if provided along with the Derivative Works; or,
|
|
||||||
within a display generated by the Derivative Works, if and
|
|
||||||
wherever such third-party notices normally appear. The contents
|
|
||||||
of the NOTICE file are for informational purposes only and
|
|
||||||
do not modify the License. You may add Your own attribution
|
|
||||||
notices within Derivative Works that You distribute, alongside
|
|
||||||
or as an addendum to the NOTICE text from the Work, provided
|
|
||||||
that such additional attribution notices cannot be construed
|
|
||||||
as modifying the License.
|
|
||||||
|
|
||||||
You may add Your own copyright statement to Your modifications and
|
|
||||||
may provide additional or different license terms and conditions
|
|
||||||
for use, reproduction, or distribution of Your modifications, or
|
|
||||||
for any such Derivative Works as a whole, provided Your use,
|
|
||||||
reproduction, and distribution of the Work otherwise complies with
|
|
||||||
the conditions stated in this License.
|
|
||||||
|
|
||||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
||||||
any Contribution intentionally submitted for inclusion in the Work
|
|
||||||
by You to the Licensor shall be under the terms and conditions of
|
|
||||||
this License, without any additional terms or conditions.
|
|
||||||
Notwithstanding the above, nothing herein shall supersede or modify
|
|
||||||
the terms of any separate license agreement you may have executed
|
|
||||||
with Licensor regarding such Contributions.
|
|
||||||
|
|
||||||
6. Trademarks. This License does not grant permission to use the trade
|
|
||||||
names, trademarks, service marks, or product names of the Licensor,
|
|
||||||
except as required for reasonable and customary use in describing the
|
|
||||||
origin of the Work and reproducing the content of the NOTICE file.
|
|
||||||
|
|
||||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
||||||
agreed to in writing, Licensor provides the Work (and each
|
|
||||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
||||||
implied, including, without limitation, any warranties or conditions
|
|
||||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
||||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
||||||
appropriateness of using or redistributing the Work and assume any
|
|
||||||
risks associated with Your exercise of permissions under this License.
|
|
||||||
|
|
||||||
8. Limitation of Liability. In no event and under no legal theory,
|
|
||||||
whether in tort (including negligence), contract, or otherwise,
|
|
||||||
unless required by applicable law (such as deliberate and grossly
|
|
||||||
negligent acts) or agreed to in writing, shall any Contributor be
|
|
||||||
liable to You for damages, including any direct, indirect, special,
|
|
||||||
incidental, or consequential damages of any character arising as a
|
|
||||||
result of this License or out of the use or inability to use the
|
|
||||||
Work (including but not limited to damages for loss of goodwill,
|
|
||||||
work stoppage, computer failure or malfunction, or any and all
|
|
||||||
other commercial damages or losses), even if such Contributor
|
|
||||||
has been advised of the possibility of such damages.
|
|
||||||
|
|
||||||
9. Accepting Warranty or Additional Liability. While redistributing
|
|
||||||
the Work or Derivative Works thereof, You may choose to offer,
|
|
||||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
||||||
or other liability obligations and/or rights consistent with this
|
|
||||||
License. However, in accepting such obligations, You may act only
|
|
||||||
on Your own behalf and on Your sole responsibility, not on behalf
|
|
||||||
of any other Contributor, and only if You agree to indemnify,
|
|
||||||
defend, and hold each Contributor harmless for any liability
|
|
||||||
incurred by, or claims asserted against, such Contributor by reason
|
|
||||||
of your accepting any such warranty or additional liability.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
Copyright 2013-2018 Docker, Inc.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
|
@ -1,223 +0,0 @@
|
|||||||
import {jest} from '@jest/globals';
|
|
||||||
|
|
||||||
export const context = {
|
|
||||||
repo: {
|
|
||||||
owner: 'docker',
|
|
||||||
repo: 'actions-toolkit'
|
|
||||||
},
|
|
||||||
ref: 'refs/heads/master',
|
|
||||||
runId: 123,
|
|
||||||
payload: {
|
|
||||||
after: '860c1904a1ce19322e91ac35af1ab07466440c37',
|
|
||||||
base_ref: null,
|
|
||||||
before: '5f3331d7f7044c18ca9f12c77d961c4d7cf3276a',
|
|
||||||
commits: [
|
|
||||||
{
|
|
||||||
author: {
|
|
||||||
email: 'crazy-max@users.noreply.github.com',
|
|
||||||
name: 'CrazyMax',
|
|
||||||
username: 'crazy-max'
|
|
||||||
},
|
|
||||||
committer: {
|
|
||||||
email: 'crazy-max@users.noreply.github.com',
|
|
||||||
name: 'CrazyMax',
|
|
||||||
username: 'crazy-max'
|
|
||||||
},
|
|
||||||
distinct: true,
|
|
||||||
id: '860c1904a1ce19322e91ac35af1ab07466440c37',
|
|
||||||
message: 'hello dev',
|
|
||||||
timestamp: '2022-04-19T11:27:24+02:00',
|
|
||||||
tree_id: 'd2c60af597e863787d2d27f569e30495b0b92820',
|
|
||||||
url: 'https://github.com/docker/test-docker-action/commit/860c1904a1ce19322e91ac35af1ab07466440c37'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
compare: 'https://github.com/docker/test-docker-action/compare/5f3331d7f704...860c1904a1ce',
|
|
||||||
created: false,
|
|
||||||
deleted: false,
|
|
||||||
forced: false,
|
|
||||||
head_commit: {
|
|
||||||
author: {
|
|
||||||
email: 'crazy-max@users.noreply.github.com',
|
|
||||||
name: 'CrazyMax',
|
|
||||||
username: 'crazy-max'
|
|
||||||
},
|
|
||||||
committer: {
|
|
||||||
email: 'crazy-max@users.noreply.github.com',
|
|
||||||
name: 'CrazyMax',
|
|
||||||
username: 'crazy-max'
|
|
||||||
},
|
|
||||||
distinct: true,
|
|
||||||
id: '860c1904a1ce19322e91ac35af1ab07466440c37',
|
|
||||||
message: 'hello dev',
|
|
||||||
timestamp: '2022-04-19T11:27:24+02:00',
|
|
||||||
tree_id: 'd2c60af597e863787d2d27f569e30495b0b92820',
|
|
||||||
url: 'https://github.com/docker/test-docker-action/commit/860c1904a1ce19322e91ac35af1ab07466440c37'
|
|
||||||
},
|
|
||||||
organization: {
|
|
||||||
avatar_url: 'https://avatars.githubusercontent.com/u/5429470?v=4',
|
|
||||||
description: 'Docker helps developers bring their ideas to life by conquering the complexity of app development.',
|
|
||||||
events_url: 'https://api.github.com/orgs/docker/events',
|
|
||||||
hooks_url: 'https://api.github.com/orgs/docker/hooks',
|
|
||||||
id: 5429470,
|
|
||||||
issues_url: 'https://api.github.com/orgs/docker/issues',
|
|
||||||
login: 'docker',
|
|
||||||
members_url: 'https://api.github.com/orgs/docker/members{/member}',
|
|
||||||
node_id: 'MDEyOk9yZ2FuaXphdGlvbjU0Mjk0NzA=',
|
|
||||||
public_members_url: 'https://api.github.com/orgs/docker/public_members{/member}',
|
|
||||||
repos_url: 'https://api.github.com/orgs/docker/repos',
|
|
||||||
url: 'https://api.github.com/orgs/docker'
|
|
||||||
},
|
|
||||||
pusher: {
|
|
||||||
email: 'github@crazymax.dev',
|
|
||||||
name: 'crazy-max'
|
|
||||||
},
|
|
||||||
ref: 'refs/heads/dev',
|
|
||||||
repository: {
|
|
||||||
allow_forking: true,
|
|
||||||
archive_url: 'https://api.github.com/repos/docker/test-docker-action/{archive_format}{/ref}',
|
|
||||||
archived: false,
|
|
||||||
assignees_url: 'https://api.github.com/repos/docker/test-docker-action/assignees{/user}',
|
|
||||||
blobs_url: 'https://api.github.com/repos/docker/test-docker-action/git/blobs{/sha}',
|
|
||||||
branches_url: 'https://api.github.com/repos/docker/test-docker-action/branches{/branch}',
|
|
||||||
clone_url: 'https://github.com/docker/test-docker-action.git',
|
|
||||||
collaborators_url: 'https://api.github.com/repos/docker/test-docker-action/collaborators{/collaborator}',
|
|
||||||
comments_url: 'https://api.github.com/repos/docker/test-docker-action/comments{/number}',
|
|
||||||
commits_url: 'https://api.github.com/repos/docker/test-docker-action/commits{/sha}',
|
|
||||||
compare_url: 'https://api.github.com/repos/docker/test-docker-action/compare/{base}...{head}',
|
|
||||||
contents_url: 'https://api.github.com/repos/docker/test-docker-action/contents/{+path}',
|
|
||||||
contributors_url: 'https://api.github.com/repos/docker/test-docker-action/contributors',
|
|
||||||
created_at: 1596792180,
|
|
||||||
default_branch: 'master',
|
|
||||||
deployments_url: 'https://api.github.com/repos/docker/test-docker-action/deployments',
|
|
||||||
description: 'Test "Docker" Actions',
|
|
||||||
disabled: false,
|
|
||||||
downloads_url: 'https://api.github.com/repos/docker/test-docker-action/downloads',
|
|
||||||
events_url: 'https://api.github.com/repos/docker/test-docker-action/events',
|
|
||||||
fork: false,
|
|
||||||
forks: 1,
|
|
||||||
forks_count: 1,
|
|
||||||
forks_url: 'https://api.github.com/repos/docker/test-docker-action/forks',
|
|
||||||
full_name: 'docker/test-docker-action',
|
|
||||||
git_commits_url: 'https://api.github.com/repos/docker/test-docker-action/git/commits{/sha}',
|
|
||||||
git_refs_url: 'https://api.github.com/repos/docker/test-docker-action/git/refs{/sha}',
|
|
||||||
git_tags_url: 'https://api.github.com/repos/docker/test-docker-action/git/tags{/sha}',
|
|
||||||
git_url: 'git://github.com/docker/test-docker-action.git',
|
|
||||||
has_downloads: true,
|
|
||||||
has_issues: true,
|
|
||||||
has_pages: false,
|
|
||||||
has_projects: true,
|
|
||||||
has_wiki: true,
|
|
||||||
homepage: '',
|
|
||||||
hooks_url: 'https://api.github.com/repos/docker/test-docker-action/hooks',
|
|
||||||
html_url: 'https://github.com/docker/test-docker-action',
|
|
||||||
id: 285789493,
|
|
||||||
is_template: false,
|
|
||||||
issue_comment_url: 'https://api.github.com/repos/docker/test-docker-action/issues/comments{/number}',
|
|
||||||
issue_events_url: 'https://api.github.com/repos/docker/test-docker-action/issues/events{/number}',
|
|
||||||
issues_url: 'https://api.github.com/repos/docker/test-docker-action/issues{/number}',
|
|
||||||
keys_url: 'https://api.github.com/repos/docker/test-docker-action/keys{/key_id}',
|
|
||||||
labels_url: 'https://api.github.com/repos/docker/test-docker-action/labels{/name}',
|
|
||||||
language: 'JavaScript',
|
|
||||||
languages_url: 'https://api.github.com/repos/docker/test-docker-action/languages',
|
|
||||||
license: {
|
|
||||||
key: 'mit',
|
|
||||||
name: 'MIT License',
|
|
||||||
node_id: 'MDc6TGljZW5zZTEz',
|
|
||||||
spdx_id: 'MIT',
|
|
||||||
url: 'https://api.github.com/licenses/mit'
|
|
||||||
},
|
|
||||||
master_branch: 'master',
|
|
||||||
merges_url: 'https://api.github.com/repos/docker/test-docker-action/merges',
|
|
||||||
milestones_url: 'https://api.github.com/repos/docker/test-docker-action/milestones{/number}',
|
|
||||||
mirror_url: null,
|
|
||||||
name: 'test-docker-action',
|
|
||||||
node_id: 'MDEwOlJlcG9zaXRvcnkyODU3ODk0OTM=',
|
|
||||||
notifications_url: 'https://api.github.com/repos/docker/test-docker-action/notifications{?since,all,participating}',
|
|
||||||
open_issues: 6,
|
|
||||||
open_issues_count: 6,
|
|
||||||
organization: 'docker',
|
|
||||||
owner: {
|
|
||||||
avatar_url: 'https://avatars.githubusercontent.com/u/5429470?v=4',
|
|
||||||
email: 'info@docker.com',
|
|
||||||
events_url: 'https://api.github.com/users/docker/events{/privacy}',
|
|
||||||
followers_url: 'https://api.github.com/users/docker/followers',
|
|
||||||
following_url: 'https://api.github.com/users/docker/following{/other_user}',
|
|
||||||
gists_url: 'https://api.github.com/users/docker/gists{/gist_id}',
|
|
||||||
gravatar_id: '',
|
|
||||||
html_url: 'https://github.com/docker',
|
|
||||||
id: 5429470,
|
|
||||||
login: 'docker',
|
|
||||||
name: 'docker',
|
|
||||||
node_id: 'MDEyOk9yZ2FuaXphdGlvbjU0Mjk0NzA=',
|
|
||||||
organizations_url: 'https://api.github.com/users/docker/orgs',
|
|
||||||
received_events_url: 'https://api.github.com/users/docker/received_events',
|
|
||||||
repos_url: 'https://api.github.com/users/docker/repos',
|
|
||||||
site_admin: false,
|
|
||||||
starred_url: 'https://api.github.com/users/docker/starred{/owner}{/repo}',
|
|
||||||
subscriptions_url: 'https://api.github.com/users/docker/subscriptions',
|
|
||||||
type: 'Organization',
|
|
||||||
url: 'https://api.github.com/users/docker'
|
|
||||||
},
|
|
||||||
private: true,
|
|
||||||
pulls_url: 'https://api.github.com/repos/docker/test-docker-action/pulls{/number}',
|
|
||||||
pushed_at: 1650360446,
|
|
||||||
releases_url: 'https://api.github.com/repos/docker/test-docker-action/releases{/id}',
|
|
||||||
size: 796,
|
|
||||||
ssh_url: 'git@github.com:docker/test-docker-action.git',
|
|
||||||
stargazers: 0,
|
|
||||||
stargazers_count: 0,
|
|
||||||
stargazers_url: 'https://api.github.com/repos/docker/test-docker-action/stargazers',
|
|
||||||
statuses_url: 'https://api.github.com/repos/docker/test-docker-action/statuses/{sha}',
|
|
||||||
subscribers_url: 'https://api.github.com/repos/docker/test-docker-action/subscribers',
|
|
||||||
subscription_url: 'https://api.github.com/repos/docker/test-docker-action/subscription',
|
|
||||||
svn_url: 'https://github.com/docker/test-docker-action',
|
|
||||||
tags_url: 'https://api.github.com/repos/docker/test-docker-action/tags',
|
|
||||||
teams_url: 'https://api.github.com/repos/docker/test-docker-action/teams',
|
|
||||||
topics: [],
|
|
||||||
trees_url: 'https://api.github.com/repos/docker/test-docker-action/git/trees{/sha}',
|
|
||||||
updated_at: '2022-04-19T09:05:09Z',
|
|
||||||
url: 'https://github.com/docker/test-docker-action',
|
|
||||||
visibility: 'private',
|
|
||||||
watchers: 0,
|
|
||||||
watchers_count: 0
|
|
||||||
},
|
|
||||||
sender: {
|
|
||||||
avatar_url: 'https://avatars.githubusercontent.com/u/1951866?v=4',
|
|
||||||
events_url: 'https://api.github.com/users/crazy-max/events{/privacy}',
|
|
||||||
followers_url: 'https://api.github.com/users/crazy-max/followers',
|
|
||||||
following_url: 'https://api.github.com/users/crazy-max/following{/other_user}',
|
|
||||||
gists_url: 'https://api.github.com/users/crazy-max/gists{/gist_id}',
|
|
||||||
gravatar_id: '',
|
|
||||||
html_url: 'https://github.com/crazy-max',
|
|
||||||
id: 1951866,
|
|
||||||
login: 'crazy-max',
|
|
||||||
node_id: 'MDQ6VXNlcjE5NTE4NjY=',
|
|
||||||
organizations_url: 'https://api.github.com/users/crazy-max/orgs',
|
|
||||||
received_events_url: 'https://api.github.com/users/crazy-max/received_events',
|
|
||||||
repos_url: 'https://api.github.com/users/crazy-max/repos',
|
|
||||||
site_admin: false,
|
|
||||||
starred_url: 'https://api.github.com/users/crazy-max/starred{/owner}{/repo}',
|
|
||||||
subscriptions_url: 'https://api.github.com/users/crazy-max/subscriptions',
|
|
||||||
type: 'User',
|
|
||||||
url: 'https://api.github.com/users/crazy-max'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
export const getOctokit = jest.fn(() => ({
|
|
||||||
rest: {
|
|
||||||
repos: {
|
|
||||||
getCommit: jest.fn(() =>
|
|
||||||
Promise.resolve({
|
|
||||||
data: {
|
|
||||||
commit: {
|
|
||||||
committer: {
|
|
||||||
date: '2024-11-13T13:42:28Z'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}));
|
|
@ -1,141 +1,66 @@
|
|||||||
import {afterEach, beforeEach, describe, expect, test, it, jest} from '@jest/globals';
|
import * as context from '../src/context';
|
||||||
import * as dotenv from 'dotenv';
|
|
||||||
import * as fs from 'fs';
|
|
||||||
import * as path from 'path';
|
|
||||||
import {Context} from '@actions/github/lib/context';
|
|
||||||
import {Git} from '@docker/actions-toolkit/lib/git';
|
|
||||||
import {GitHub} from '@docker/actions-toolkit/lib/github';
|
|
||||||
import {Toolkit} from '@docker/actions-toolkit/lib/toolkit';
|
|
||||||
|
|
||||||
import {ContextSource, getContext, getInputs, Inputs} from '../src/context';
|
describe('getInputList', () => {
|
||||||
|
it('handles single line correctly', async () => {
|
||||||
|
await setInput('foo', 'bar');
|
||||||
|
const res = await context.getInputList('foo');
|
||||||
|
console.log(res);
|
||||||
|
expect(res).toEqual(['bar']);
|
||||||
|
});
|
||||||
|
|
||||||
const toolkit = new Toolkit({githubToken: 'fake-github-token'});
|
it('handles multiple lines correctly', async () => {
|
||||||
|
setInput('foo', 'bar\nbaz');
|
||||||
|
const res = await context.getInputList('foo');
|
||||||
|
console.log(res);
|
||||||
|
expect(res).toEqual(['bar', 'baz']);
|
||||||
|
});
|
||||||
|
|
||||||
beforeEach(() => {
|
it('remove empty lines correctly', async () => {
|
||||||
jest.clearAllMocks();
|
setInput('foo', 'bar\n\nbaz');
|
||||||
jest.spyOn(GitHub, 'context', 'get').mockImplementation((): Context => {
|
const res = await context.getInputList('foo');
|
||||||
return new Context();
|
console.log(res);
|
||||||
|
expect(res).toEqual(['bar', 'baz']);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('handles comma correctly', async () => {
|
||||||
|
setInput('foo', 'bar,baz');
|
||||||
|
const res = await context.getInputList('foo');
|
||||||
|
console.log(res);
|
||||||
|
expect(res).toEqual(['bar', 'baz']);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('remove empty result correctly', async () => {
|
||||||
|
setInput('foo', 'bar,baz,');
|
||||||
|
const res = await context.getInputList('foo');
|
||||||
|
console.log(res);
|
||||||
|
expect(res).toEqual(['bar', 'baz']);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('handles different new lines correctly', async () => {
|
||||||
|
setInput('foo', 'bar\r\nbaz');
|
||||||
|
const res = await context.getInputList('foo');
|
||||||
|
console.log(res);
|
||||||
|
expect(res).toEqual(['bar', 'baz']);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('handles different new lines and comma correctly', async () => {
|
||||||
|
setInput('foo', 'bar\r\nbaz,bat');
|
||||||
|
const res = await context.getInputList('foo');
|
||||||
|
console.log(res);
|
||||||
|
expect(res).toEqual(['bar', 'baz', 'bat']);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('getInputs', () => {
|
describe('asyncForEach', () => {
|
||||||
beforeEach(() => {
|
it('executes async tasks sequentially', async () => {
|
||||||
process.env = Object.keys(process.env).reduce((object, key) => {
|
const testValues = [1, 2, 3, 4, 5];
|
||||||
if (!key.startsWith('INPUT_')) {
|
const results: number[] = [];
|
||||||
object[key] = process.env[key];
|
|
||||||
}
|
|
||||||
return object;
|
|
||||||
}, {});
|
|
||||||
});
|
|
||||||
|
|
||||||
// prettier-ignore
|
await context.asyncForEach(testValues, async value => {
|
||||||
test.each([
|
results.push(value);
|
||||||
[
|
|
||||||
0,
|
|
||||||
new Map<string, string>([
|
|
||||||
['images', 'moby/buildkit\nghcr.io/moby/mbuildkit'],
|
|
||||||
]),
|
|
||||||
{
|
|
||||||
context: ContextSource.workflow,
|
|
||||||
bakeTarget: 'docker-metadata-action',
|
|
||||||
flavor: [],
|
|
||||||
githubToken: '',
|
|
||||||
images: ['moby/buildkit', 'ghcr.io/moby/mbuildkit'],
|
|
||||||
labels: [],
|
|
||||||
annotations: [],
|
|
||||||
sepLabels: '\n',
|
|
||||||
sepTags: '\n',
|
|
||||||
sepAnnotations: '\n',
|
|
||||||
tags: [],
|
|
||||||
} as Inputs
|
|
||||||
],
|
|
||||||
[
|
|
||||||
1,
|
|
||||||
new Map<string, string>([
|
|
||||||
['bake-target', 'metadata'],
|
|
||||||
['images', 'moby/buildkit'],
|
|
||||||
['sep-labels', ','],
|
|
||||||
['sep-tags', ','],
|
|
||||||
['sep-annotations', ',']
|
|
||||||
]),
|
|
||||||
{
|
|
||||||
context: ContextSource.workflow,
|
|
||||||
bakeTarget: 'metadata',
|
|
||||||
flavor: [],
|
|
||||||
githubToken: '',
|
|
||||||
images: ['moby/buildkit'],
|
|
||||||
labels: [],
|
|
||||||
annotations: [],
|
|
||||||
sepLabels: ',',
|
|
||||||
sepTags: ',',
|
|
||||||
sepAnnotations: ',',
|
|
||||||
tags: [],
|
|
||||||
} as Inputs
|
|
||||||
],
|
|
||||||
[
|
|
||||||
2,
|
|
||||||
new Map<string, string>([
|
|
||||||
['images', 'moby/buildkit\n#comment\nghcr.io/moby/mbuildkit'],
|
|
||||||
]),
|
|
||||||
{
|
|
||||||
context: ContextSource.workflow,
|
|
||||||
bakeTarget: 'docker-metadata-action',
|
|
||||||
flavor: [],
|
|
||||||
githubToken: '',
|
|
||||||
images: ['moby/buildkit', 'ghcr.io/moby/mbuildkit'],
|
|
||||||
labels: [],
|
|
||||||
annotations: [],
|
|
||||||
sepLabels: '\n',
|
|
||||||
sepTags: '\n',
|
|
||||||
sepAnnotations: '\n',
|
|
||||||
tags: [],
|
|
||||||
} as Inputs
|
|
||||||
],
|
|
||||||
])(
|
|
||||||
'[%d] given %p as inputs, returns %p',
|
|
||||||
async (num: number, inputs: Map<string, string>, expected: Inputs) => {
|
|
||||||
inputs.forEach((value: string, name: string) => {
|
|
||||||
setInput(name, value);
|
|
||||||
});
|
|
||||||
expect(await getInputs()).toEqual(expected);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('getContext', () => {
|
|
||||||
const originalEnv = process.env;
|
|
||||||
beforeEach(() => {
|
|
||||||
jest.resetModules();
|
|
||||||
process.env = {
|
|
||||||
...originalEnv,
|
|
||||||
...dotenv.parse(fs.readFileSync(path.join(__dirname, 'fixtures/event_create_branch.env')))
|
|
||||||
};
|
|
||||||
});
|
|
||||||
afterEach(() => {
|
|
||||||
process.env = originalEnv;
|
|
||||||
});
|
|
||||||
|
|
||||||
it('workflow', async () => {
|
|
||||||
const context = await getContext(ContextSource.workflow, toolkit);
|
|
||||||
expect(context.ref).toEqual('refs/heads/dev');
|
|
||||||
expect(context.sha).toEqual('5f3331d7f7044c18ca9f12c77d961c4d7cf3276a');
|
|
||||||
expect(context.commitDate).toEqual(new Date('2024-11-13T13:42:28.000Z'));
|
|
||||||
});
|
|
||||||
|
|
||||||
it('git', async () => {
|
|
||||||
jest.spyOn(Git, 'context').mockImplementation((): Promise<Context> => {
|
|
||||||
return Promise.resolve({
|
|
||||||
ref: 'refs/heads/git-test',
|
|
||||||
sha: 'git-test-sha'
|
|
||||||
} as Context);
|
|
||||||
});
|
});
|
||||||
jest.spyOn(Git, 'commitDate').mockImplementation(async (): Promise<Date> => {
|
|
||||||
return new Date('2023-01-01T13:42:28.000Z');
|
expect(results).toEqual(testValues);
|
||||||
});
|
|
||||||
const context = await getContext(ContextSource.git, toolkit);
|
|
||||||
expect(context.ref).toEqual('refs/heads/git-test');
|
|
||||||
expect(context.sha).toEqual('git-test-sha');
|
|
||||||
expect(context.commitDate).toEqual(new Date('2023-01-01T13:42:28.000Z'));
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1,30 +0,0 @@
|
|||||||
GITHUB_ACTION=__crazy-max_ghaction-dump-context
|
|
||||||
GITHUB_ACTIONS=true
|
|
||||||
GITHUB_ACTION_PATH=/home/runner/work/_actions/crazy-max/ghaction-dump-context/v1
|
|
||||||
GITHUB_ACTION_REF=
|
|
||||||
GITHUB_ACTION_REPOSITORY=
|
|
||||||
GITHUB_ACTOR=crazy-max
|
|
||||||
GITHUB_API_URL=https://api.github.com
|
|
||||||
GITHUB_BASE_REF=
|
|
||||||
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_49ba9b4e-1733-447c-b700-1cea19f95b82
|
|
||||||
GITHUB_EVENT_NAME=create
|
|
||||||
GITHUB_EVENT_PATH=./__tests__/fixtures/event_create_branch.json
|
|
||||||
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
|
|
||||||
GITHUB_HEAD_REF=
|
|
||||||
GITHUB_JOB=test
|
|
||||||
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_49ba9b4e-1733-447c-b700-1cea19f95b82
|
|
||||||
GITHUB_REF=refs/heads/dev
|
|
||||||
GITHUB_REF_NAME=dev
|
|
||||||
GITHUB_REF_PROTECTED=false
|
|
||||||
GITHUB_REF_TYPE=branch
|
|
||||||
GITHUB_REPOSITORY=docker/test-docker-action
|
|
||||||
GITHUB_REPOSITORY_OWNER=docker
|
|
||||||
GITHUB_RETENTION_DAYS=90
|
|
||||||
GITHUB_RUN_ATTEMPT=1
|
|
||||||
GITHUB_RUN_ID=2188731929
|
|
||||||
GITHUB_RUN_NUMBER=14
|
|
||||||
GITHUB_SERVER_URL=https://github.com
|
|
||||||
GITHUB_SHA=5f3331d7f7044c18ca9f12c77d961c4d7cf3276a
|
|
||||||
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_49ba9b4e-1733-447c-b700-1cea19f95b82
|
|
||||||
GITHUB_WORKFLOW=metadata
|
|
||||||
GITHUB_WORKSPACE=/home/runner/work/test-docker-action/test-docker-action
|
|
@ -1,145 +0,0 @@
|
|||||||
{
|
|
||||||
"description": "Test \"Docker\" Actions",
|
|
||||||
"master_branch": "master",
|
|
||||||
"organization": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/5429470?v=4",
|
|
||||||
"description": "Docker helps developers bring their ideas to life by conquering the complexity of app development.",
|
|
||||||
"events_url": "https://api.github.com/orgs/docker/events",
|
|
||||||
"hooks_url": "https://api.github.com/orgs/docker/hooks",
|
|
||||||
"id": 5429470,
|
|
||||||
"issues_url": "https://api.github.com/orgs/docker/issues",
|
|
||||||
"login": "docker",
|
|
||||||
"members_url": "https://api.github.com/orgs/docker/members{/member}",
|
|
||||||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjU0Mjk0NzA=",
|
|
||||||
"public_members_url": "https://api.github.com/orgs/docker/public_members{/member}",
|
|
||||||
"repos_url": "https://api.github.com/orgs/docker/repos",
|
|
||||||
"url": "https://api.github.com/orgs/docker"
|
|
||||||
},
|
|
||||||
"pusher_type": "user",
|
|
||||||
"ref": "dev",
|
|
||||||
"ref_type": "branch",
|
|
||||||
"repository": {
|
|
||||||
"allow_forking": true,
|
|
||||||
"archive_url": "https://api.github.com/repos/docker/test-docker-action/{archive_format}{/ref}",
|
|
||||||
"archived": false,
|
|
||||||
"assignees_url": "https://api.github.com/repos/docker/test-docker-action/assignees{/user}",
|
|
||||||
"blobs_url": "https://api.github.com/repos/docker/test-docker-action/git/blobs{/sha}",
|
|
||||||
"branches_url": "https://api.github.com/repos/docker/test-docker-action/branches{/branch}",
|
|
||||||
"clone_url": "https://github.com/docker/test-docker-action.git",
|
|
||||||
"collaborators_url": "https://api.github.com/repos/docker/test-docker-action/collaborators{/collaborator}",
|
|
||||||
"comments_url": "https://api.github.com/repos/docker/test-docker-action/comments{/number}",
|
|
||||||
"commits_url": "https://api.github.com/repos/docker/test-docker-action/commits{/sha}",
|
|
||||||
"compare_url": "https://api.github.com/repos/docker/test-docker-action/compare/{base}...{head}",
|
|
||||||
"contents_url": "https://api.github.com/repos/docker/test-docker-action/contents/{+path}",
|
|
||||||
"contributors_url": "https://api.github.com/repos/docker/test-docker-action/contributors",
|
|
||||||
"created_at": "2020-08-07T09:23:00Z",
|
|
||||||
"default_branch": "master",
|
|
||||||
"deployments_url": "https://api.github.com/repos/docker/test-docker-action/deployments",
|
|
||||||
"description": "Test \"Docker\" Actions",
|
|
||||||
"disabled": false,
|
|
||||||
"downloads_url": "https://api.github.com/repos/docker/test-docker-action/downloads",
|
|
||||||
"events_url": "https://api.github.com/repos/docker/test-docker-action/events",
|
|
||||||
"fork": false,
|
|
||||||
"forks": 1,
|
|
||||||
"forks_count": 1,
|
|
||||||
"forks_url": "https://api.github.com/repos/docker/test-docker-action/forks",
|
|
||||||
"full_name": "docker/test-docker-action",
|
|
||||||
"git_commits_url": "https://api.github.com/repos/docker/test-docker-action/git/commits{/sha}",
|
|
||||||
"git_refs_url": "https://api.github.com/repos/docker/test-docker-action/git/refs{/sha}",
|
|
||||||
"git_tags_url": "https://api.github.com/repos/docker/test-docker-action/git/tags{/sha}",
|
|
||||||
"git_url": "git://github.com/docker/test-docker-action.git",
|
|
||||||
"has_downloads": true,
|
|
||||||
"has_issues": true,
|
|
||||||
"has_pages": false,
|
|
||||||
"has_projects": true,
|
|
||||||
"has_wiki": true,
|
|
||||||
"homepage": "",
|
|
||||||
"hooks_url": "https://api.github.com/repos/docker/test-docker-action/hooks",
|
|
||||||
"html_url": "https://github.com/docker/test-docker-action",
|
|
||||||
"id": 285789493,
|
|
||||||
"is_template": false,
|
|
||||||
"issue_comment_url": "https://api.github.com/repos/docker/test-docker-action/issues/comments{/number}",
|
|
||||||
"issue_events_url": "https://api.github.com/repos/docker/test-docker-action/issues/events{/number}",
|
|
||||||
"issues_url": "https://api.github.com/repos/docker/test-docker-action/issues{/number}",
|
|
||||||
"keys_url": "https://api.github.com/repos/docker/test-docker-action/keys{/key_id}",
|
|
||||||
"labels_url": "https://api.github.com/repos/docker/test-docker-action/labels{/name}",
|
|
||||||
"language": "JavaScript",
|
|
||||||
"languages_url": "https://api.github.com/repos/docker/test-docker-action/languages",
|
|
||||||
"license": {
|
|
||||||
"key": "mit",
|
|
||||||
"name": "MIT License",
|
|
||||||
"node_id": "MDc6TGljZW5zZTEz",
|
|
||||||
"spdx_id": "MIT",
|
|
||||||
"url": "https://api.github.com/licenses/mit"
|
|
||||||
},
|
|
||||||
"merges_url": "https://api.github.com/repos/docker/test-docker-action/merges",
|
|
||||||
"milestones_url": "https://api.github.com/repos/docker/test-docker-action/milestones{/number}",
|
|
||||||
"mirror_url": null,
|
|
||||||
"name": "test-docker-action",
|
|
||||||
"node_id": "MDEwOlJlcG9zaXRvcnkyODU3ODk0OTM=",
|
|
||||||
"notifications_url": "https://api.github.com/repos/docker/test-docker-action/notifications{?since,all,participating}",
|
|
||||||
"open_issues": 6,
|
|
||||||
"open_issues_count": 6,
|
|
||||||
"owner": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/5429470?v=4",
|
|
||||||
"events_url": "https://api.github.com/users/docker/events{/privacy}",
|
|
||||||
"followers_url": "https://api.github.com/users/docker/followers",
|
|
||||||
"following_url": "https://api.github.com/users/docker/following{/other_user}",
|
|
||||||
"gists_url": "https://api.github.com/users/docker/gists{/gist_id}",
|
|
||||||
"gravatar_id": "",
|
|
||||||
"html_url": "https://github.com/docker",
|
|
||||||
"id": 5429470,
|
|
||||||
"login": "docker",
|
|
||||||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjU0Mjk0NzA=",
|
|
||||||
"organizations_url": "https://api.github.com/users/docker/orgs",
|
|
||||||
"received_events_url": "https://api.github.com/users/docker/received_events",
|
|
||||||
"repos_url": "https://api.github.com/users/docker/repos",
|
|
||||||
"site_admin": false,
|
|
||||||
"starred_url": "https://api.github.com/users/docker/starred{/owner}{/repo}",
|
|
||||||
"subscriptions_url": "https://api.github.com/users/docker/subscriptions",
|
|
||||||
"type": "Organization",
|
|
||||||
"url": "https://api.github.com/users/docker"
|
|
||||||
},
|
|
||||||
"private": true,
|
|
||||||
"pulls_url": "https://api.github.com/repos/docker/test-docker-action/pulls{/number}",
|
|
||||||
"pushed_at": "2022-04-19T09:24:14Z",
|
|
||||||
"releases_url": "https://api.github.com/repos/docker/test-docker-action/releases{/id}",
|
|
||||||
"size": 796,
|
|
||||||
"ssh_url": "git@github.com:docker/test-docker-action.git",
|
|
||||||
"stargazers_count": 0,
|
|
||||||
"stargazers_url": "https://api.github.com/repos/docker/test-docker-action/stargazers",
|
|
||||||
"statuses_url": "https://api.github.com/repos/docker/test-docker-action/statuses/{sha}",
|
|
||||||
"subscribers_url": "https://api.github.com/repos/docker/test-docker-action/subscribers",
|
|
||||||
"subscription_url": "https://api.github.com/repos/docker/test-docker-action/subscription",
|
|
||||||
"svn_url": "https://github.com/docker/test-docker-action",
|
|
||||||
"tags_url": "https://api.github.com/repos/docker/test-docker-action/tags",
|
|
||||||
"teams_url": "https://api.github.com/repos/docker/test-docker-action/teams",
|
|
||||||
"topics": [],
|
|
||||||
"trees_url": "https://api.github.com/repos/docker/test-docker-action/git/trees{/sha}",
|
|
||||||
"updated_at": "2022-04-19T09:05:09Z",
|
|
||||||
"url": "https://api.github.com/repos/docker/test-docker-action",
|
|
||||||
"visibility": "private",
|
|
||||||
"watchers": 0,
|
|
||||||
"watchers_count": 0
|
|
||||||
},
|
|
||||||
"sender": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/1951866?v=4",
|
|
||||||
"events_url": "https://api.github.com/users/crazy-max/events{/privacy}",
|
|
||||||
"followers_url": "https://api.github.com/users/crazy-max/followers",
|
|
||||||
"following_url": "https://api.github.com/users/crazy-max/following{/other_user}",
|
|
||||||
"gists_url": "https://api.github.com/users/crazy-max/gists{/gist_id}",
|
|
||||||
"gravatar_id": "",
|
|
||||||
"html_url": "https://github.com/crazy-max",
|
|
||||||
"id": 1951866,
|
|
||||||
"login": "crazy-max",
|
|
||||||
"node_id": "MDQ6VXNlcjE5NTE4NjY=",
|
|
||||||
"organizations_url": "https://api.github.com/users/crazy-max/orgs",
|
|
||||||
"received_events_url": "https://api.github.com/users/crazy-max/received_events",
|
|
||||||
"repos_url": "https://api.github.com/users/crazy-max/repos",
|
|
||||||
"site_admin": false,
|
|
||||||
"starred_url": "https://api.github.com/users/crazy-max/starred{/owner}{/repo}",
|
|
||||||
"subscriptions_url": "https://api.github.com/users/crazy-max/subscriptions",
|
|
||||||
"type": "User",
|
|
||||||
"url": "https://api.github.com/users/crazy-max"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,30 +0,0 @@
|
|||||||
GITHUB_ACTION=__crazy-max_ghaction-dump-context
|
|
||||||
GITHUB_ACTIONS=true
|
|
||||||
GITHUB_ACTION_PATH=/home/runner/work/_actions/crazy-max/ghaction-dump-context/v1
|
|
||||||
GITHUB_ACTION_REF=
|
|
||||||
GITHUB_ACTION_REPOSITORY=
|
|
||||||
GITHUB_ACTOR=crazy-max
|
|
||||||
GITHUB_API_URL=https://api.github.com
|
|
||||||
GITHUB_BASE_REF=
|
|
||||||
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_06751acb-da10-4e54-916a-60749556fc8b
|
|
||||||
GITHUB_EVENT_NAME=create
|
|
||||||
GITHUB_EVENT_PATH=./__tests__/fixtures/event_create_tag.json
|
|
||||||
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
|
|
||||||
GITHUB_HEAD_REF=
|
|
||||||
GITHUB_JOB=test
|
|
||||||
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_06751acb-da10-4e54-916a-60749556fc8b
|
|
||||||
GITHUB_REF=refs/tags/v2.1.8-beta.67
|
|
||||||
GITHUB_REF_NAME=v2.1.8-beta.67
|
|
||||||
GITHUB_REF_PROTECTED=false
|
|
||||||
GITHUB_REF_TYPE=tag
|
|
||||||
GITHUB_REPOSITORY=docker/test-docker-action
|
|
||||||
GITHUB_REPOSITORY_OWNER=docker
|
|
||||||
GITHUB_RETENTION_DAYS=90
|
|
||||||
GITHUB_RUN_ATTEMPT=1
|
|
||||||
GITHUB_RUN_ID=2188815957
|
|
||||||
GITHUB_RUN_NUMBER=22
|
|
||||||
GITHUB_SERVER_URL=https://github.com
|
|
||||||
GITHUB_SHA=860c1904a1ce19322e91ac35af1ab07466440c37
|
|
||||||
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_06751acb-da10-4e54-916a-60749556fc8b
|
|
||||||
GITHUB_WORKFLOW=metadata
|
|
||||||
GITHUB_WORKSPACE=/home/runner/work/test-docker-action/test-docker-action
|
|
@ -1,145 +0,0 @@
|
|||||||
{
|
|
||||||
"description": "Test \"Docker\" Actions",
|
|
||||||
"master_branch": "master",
|
|
||||||
"organization": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/5429470?v=4",
|
|
||||||
"description": "Docker helps developers bring their ideas to life by conquering the complexity of app development.",
|
|
||||||
"events_url": "https://api.github.com/orgs/docker/events",
|
|
||||||
"hooks_url": "https://api.github.com/orgs/docker/hooks",
|
|
||||||
"id": 5429470,
|
|
||||||
"issues_url": "https://api.github.com/orgs/docker/issues",
|
|
||||||
"login": "docker",
|
|
||||||
"members_url": "https://api.github.com/orgs/docker/members{/member}",
|
|
||||||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjU0Mjk0NzA=",
|
|
||||||
"public_members_url": "https://api.github.com/orgs/docker/public_members{/member}",
|
|
||||||
"repos_url": "https://api.github.com/orgs/docker/repos",
|
|
||||||
"url": "https://api.github.com/orgs/docker"
|
|
||||||
},
|
|
||||||
"pusher_type": "user",
|
|
||||||
"ref": "v2.1.8-beta.67",
|
|
||||||
"ref_type": "tag",
|
|
||||||
"repository": {
|
|
||||||
"allow_forking": true,
|
|
||||||
"archive_url": "https://api.github.com/repos/docker/test-docker-action/{archive_format}{/ref}",
|
|
||||||
"archived": false,
|
|
||||||
"assignees_url": "https://api.github.com/repos/docker/test-docker-action/assignees{/user}",
|
|
||||||
"blobs_url": "https://api.github.com/repos/docker/test-docker-action/git/blobs{/sha}",
|
|
||||||
"branches_url": "https://api.github.com/repos/docker/test-docker-action/branches{/branch}",
|
|
||||||
"clone_url": "https://github.com/docker/test-docker-action.git",
|
|
||||||
"collaborators_url": "https://api.github.com/repos/docker/test-docker-action/collaborators{/collaborator}",
|
|
||||||
"comments_url": "https://api.github.com/repos/docker/test-docker-action/comments{/number}",
|
|
||||||
"commits_url": "https://api.github.com/repos/docker/test-docker-action/commits{/sha}",
|
|
||||||
"compare_url": "https://api.github.com/repos/docker/test-docker-action/compare/{base}...{head}",
|
|
||||||
"contents_url": "https://api.github.com/repos/docker/test-docker-action/contents/{+path}",
|
|
||||||
"contributors_url": "https://api.github.com/repos/docker/test-docker-action/contributors",
|
|
||||||
"created_at": "2020-08-07T09:23:00Z",
|
|
||||||
"default_branch": "master",
|
|
||||||
"deployments_url": "https://api.github.com/repos/docker/test-docker-action/deployments",
|
|
||||||
"description": "Test \"Docker\" Actions",
|
|
||||||
"disabled": false,
|
|
||||||
"downloads_url": "https://api.github.com/repos/docker/test-docker-action/downloads",
|
|
||||||
"events_url": "https://api.github.com/repos/docker/test-docker-action/events",
|
|
||||||
"fork": false,
|
|
||||||
"forks": 1,
|
|
||||||
"forks_count": 1,
|
|
||||||
"forks_url": "https://api.github.com/repos/docker/test-docker-action/forks",
|
|
||||||
"full_name": "docker/test-docker-action",
|
|
||||||
"git_commits_url": "https://api.github.com/repos/docker/test-docker-action/git/commits{/sha}",
|
|
||||||
"git_refs_url": "https://api.github.com/repos/docker/test-docker-action/git/refs{/sha}",
|
|
||||||
"git_tags_url": "https://api.github.com/repos/docker/test-docker-action/git/tags{/sha}",
|
|
||||||
"git_url": "git://github.com/docker/test-docker-action.git",
|
|
||||||
"has_downloads": true,
|
|
||||||
"has_issues": true,
|
|
||||||
"has_pages": false,
|
|
||||||
"has_projects": true,
|
|
||||||
"has_wiki": true,
|
|
||||||
"homepage": "",
|
|
||||||
"hooks_url": "https://api.github.com/repos/docker/test-docker-action/hooks",
|
|
||||||
"html_url": "https://github.com/docker/test-docker-action",
|
|
||||||
"id": 285789493,
|
|
||||||
"is_template": false,
|
|
||||||
"issue_comment_url": "https://api.github.com/repos/docker/test-docker-action/issues/comments{/number}",
|
|
||||||
"issue_events_url": "https://api.github.com/repos/docker/test-docker-action/issues/events{/number}",
|
|
||||||
"issues_url": "https://api.github.com/repos/docker/test-docker-action/issues{/number}",
|
|
||||||
"keys_url": "https://api.github.com/repos/docker/test-docker-action/keys{/key_id}",
|
|
||||||
"labels_url": "https://api.github.com/repos/docker/test-docker-action/labels{/name}",
|
|
||||||
"language": "JavaScript",
|
|
||||||
"languages_url": "https://api.github.com/repos/docker/test-docker-action/languages",
|
|
||||||
"license": {
|
|
||||||
"key": "mit",
|
|
||||||
"name": "MIT License",
|
|
||||||
"node_id": "MDc6TGljZW5zZTEz",
|
|
||||||
"spdx_id": "MIT",
|
|
||||||
"url": "https://api.github.com/licenses/mit"
|
|
||||||
},
|
|
||||||
"merges_url": "https://api.github.com/repos/docker/test-docker-action/merges",
|
|
||||||
"milestones_url": "https://api.github.com/repos/docker/test-docker-action/milestones{/number}",
|
|
||||||
"mirror_url": null,
|
|
||||||
"name": "test-docker-action",
|
|
||||||
"node_id": "MDEwOlJlcG9zaXRvcnkyODU3ODk0OTM=",
|
|
||||||
"notifications_url": "https://api.github.com/repos/docker/test-docker-action/notifications{?since,all,participating}",
|
|
||||||
"open_issues": 6,
|
|
||||||
"open_issues_count": 6,
|
|
||||||
"owner": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/5429470?v=4",
|
|
||||||
"events_url": "https://api.github.com/users/docker/events{/privacy}",
|
|
||||||
"followers_url": "https://api.github.com/users/docker/followers",
|
|
||||||
"following_url": "https://api.github.com/users/docker/following{/other_user}",
|
|
||||||
"gists_url": "https://api.github.com/users/docker/gists{/gist_id}",
|
|
||||||
"gravatar_id": "",
|
|
||||||
"html_url": "https://github.com/docker",
|
|
||||||
"id": 5429470,
|
|
||||||
"login": "docker",
|
|
||||||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjU0Mjk0NzA=",
|
|
||||||
"organizations_url": "https://api.github.com/users/docker/orgs",
|
|
||||||
"received_events_url": "https://api.github.com/users/docker/received_events",
|
|
||||||
"repos_url": "https://api.github.com/users/docker/repos",
|
|
||||||
"site_admin": false,
|
|
||||||
"starred_url": "https://api.github.com/users/docker/starred{/owner}{/repo}",
|
|
||||||
"subscriptions_url": "https://api.github.com/users/docker/subscriptions",
|
|
||||||
"type": "Organization",
|
|
||||||
"url": "https://api.github.com/users/docker"
|
|
||||||
},
|
|
||||||
"private": true,
|
|
||||||
"pulls_url": "https://api.github.com/repos/docker/test-docker-action/pulls{/number}",
|
|
||||||
"pushed_at": "2022-04-19T09:41:03Z",
|
|
||||||
"releases_url": "https://api.github.com/repos/docker/test-docker-action/releases{/id}",
|
|
||||||
"size": 796,
|
|
||||||
"ssh_url": "git@github.com:docker/test-docker-action.git",
|
|
||||||
"stargazers_count": 0,
|
|
||||||
"stargazers_url": "https://api.github.com/repos/docker/test-docker-action/stargazers",
|
|
||||||
"statuses_url": "https://api.github.com/repos/docker/test-docker-action/statuses/{sha}",
|
|
||||||
"subscribers_url": "https://api.github.com/repos/docker/test-docker-action/subscribers",
|
|
||||||
"subscription_url": "https://api.github.com/repos/docker/test-docker-action/subscription",
|
|
||||||
"svn_url": "https://github.com/docker/test-docker-action",
|
|
||||||
"tags_url": "https://api.github.com/repos/docker/test-docker-action/tags",
|
|
||||||
"teams_url": "https://api.github.com/repos/docker/test-docker-action/teams",
|
|
||||||
"topics": [],
|
|
||||||
"trees_url": "https://api.github.com/repos/docker/test-docker-action/git/trees{/sha}",
|
|
||||||
"updated_at": "2022-04-19T09:05:09Z",
|
|
||||||
"url": "https://api.github.com/repos/docker/test-docker-action",
|
|
||||||
"visibility": "private",
|
|
||||||
"watchers": 0,
|
|
||||||
"watchers_count": 0
|
|
||||||
},
|
|
||||||
"sender": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/1951866?v=4",
|
|
||||||
"events_url": "https://api.github.com/users/crazy-max/events{/privacy}",
|
|
||||||
"followers_url": "https://api.github.com/users/crazy-max/followers",
|
|
||||||
"following_url": "https://api.github.com/users/crazy-max/following{/other_user}",
|
|
||||||
"gists_url": "https://api.github.com/users/crazy-max/gists{/gist_id}",
|
|
||||||
"gravatar_id": "",
|
|
||||||
"html_url": "https://github.com/crazy-max",
|
|
||||||
"id": 1951866,
|
|
||||||
"login": "crazy-max",
|
|
||||||
"node_id": "MDQ6VXNlcjE5NTE4NjY=",
|
|
||||||
"organizations_url": "https://api.github.com/users/crazy-max/orgs",
|
|
||||||
"received_events_url": "https://api.github.com/users/crazy-max/received_events",
|
|
||||||
"repos_url": "https://api.github.com/users/crazy-max/repos",
|
|
||||||
"site_admin": false,
|
|
||||||
"starred_url": "https://api.github.com/users/crazy-max/starred{/owner}{/repo}",
|
|
||||||
"subscriptions_url": "https://api.github.com/users/crazy-max/subscriptions",
|
|
||||||
"type": "User",
|
|
||||||
"url": "https://api.github.com/users/crazy-max"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,30 +0,0 @@
|
|||||||
GITHUB_ACTION=__crazy-max_ghaction-dump-context
|
|
||||||
GITHUB_ACTIONS=true
|
|
||||||
GITHUB_ACTION_PATH=/home/runner/work/_actions/crazy-max/ghaction-dump-context/v1
|
|
||||||
GITHUB_ACTION_REF=
|
|
||||||
GITHUB_ACTION_REPOSITORY=
|
|
||||||
GITHUB_ACTOR=crazy-max
|
|
||||||
GITHUB_API_URL=https://api.github.com
|
|
||||||
GITHUB_BASE_REF=
|
|
||||||
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_5f8f9da1-1c58-4a8e-bef4-dba436a05edf
|
|
||||||
GITHUB_EVENT_NAME=discussion
|
|
||||||
GITHUB_EVENT_PATH=./__tests__/fixtures/event_discussion_created.json
|
|
||||||
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
|
|
||||||
GITHUB_HEAD_REF=
|
|
||||||
GITHUB_JOB=test
|
|
||||||
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_5f8f9da1-1c58-4a8e-bef4-dba436a05edf
|
|
||||||
GITHUB_REF=refs/heads/master
|
|
||||||
GITHUB_REF_NAME=master
|
|
||||||
GITHUB_REF_PROTECTED=false
|
|
||||||
GITHUB_REF_TYPE=branch
|
|
||||||
GITHUB_REPOSITORY=docker/test-docker-action
|
|
||||||
GITHUB_REPOSITORY_OWNER=docker
|
|
||||||
GITHUB_RETENTION_DAYS=90
|
|
||||||
GITHUB_RUN_ATTEMPT=1
|
|
||||||
GITHUB_RUN_ID=2188642055
|
|
||||||
GITHUB_RUN_NUMBER=7
|
|
||||||
GITHUB_SERVER_URL=https://github.com
|
|
||||||
GITHUB_SHA=266574110acf203503badf966df2ea24b5d732d7
|
|
||||||
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_5f8f9da1-1c58-4a8e-bef4-dba436a05edf
|
|
||||||
GITHUB_WORKFLOW=metadata
|
|
||||||
GITHUB_WORKSPACE=/home/runner/work/test-docker-action/test-docker-action
|
|
@ -1,205 +0,0 @@
|
|||||||
{
|
|
||||||
"action": "created",
|
|
||||||
"discussion": {
|
|
||||||
"active_lock_reason": null,
|
|
||||||
"answer_chosen_at": null,
|
|
||||||
"answer_chosen_by": null,
|
|
||||||
"answer_html_url": null,
|
|
||||||
"author_association": "COLLABORATOR",
|
|
||||||
"body": "bar",
|
|
||||||
"category": {
|
|
||||||
"created_at": "2022-04-19T11:05:12.000+02:00",
|
|
||||||
"description": "Chat about anything and everything here",
|
|
||||||
"emoji": ":speech_balloon:",
|
|
||||||
"id": 37396924,
|
|
||||||
"is_answerable": false,
|
|
||||||
"name": "General",
|
|
||||||
"node_id": "DIC_kwDOEQjNNc4COqG8",
|
|
||||||
"repository_id": 285789493,
|
|
||||||
"slug": "general",
|
|
||||||
"updated_at": "2022-04-19T11:05:12.000+02:00"
|
|
||||||
},
|
|
||||||
"comments": 0,
|
|
||||||
"created_at": "2022-04-19T09:07:32Z",
|
|
||||||
"html_url": "https://github.com/docker/test-docker-action/discussions/13",
|
|
||||||
"id": 4019118,
|
|
||||||
"locked": false,
|
|
||||||
"node_id": "D_kwDOEQjNNc4APVOu",
|
|
||||||
"number": 13,
|
|
||||||
"reactions": {
|
|
||||||
"+1": 0,
|
|
||||||
"-1": 0,
|
|
||||||
"confused": 0,
|
|
||||||
"eyes": 0,
|
|
||||||
"heart": 0,
|
|
||||||
"hooray": 0,
|
|
||||||
"laugh": 0,
|
|
||||||
"rocket": 0,
|
|
||||||
"total_count": 0,
|
|
||||||
"url": "https://api.github.com/repos/docker/test-docker-action/discussions/13/reactions"
|
|
||||||
},
|
|
||||||
"repository_url": "https://api.github.com/repos/docker/test-docker-action",
|
|
||||||
"state": "open",
|
|
||||||
"timeline_url": "https://api.github.com/repos/docker/test-docker-action/discussions/13/timeline",
|
|
||||||
"title": "foo",
|
|
||||||
"updated_at": "2022-04-19T09:07:32Z",
|
|
||||||
"user": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/1951866?v=4",
|
|
||||||
"events_url": "https://api.github.com/users/crazy-max/events{/privacy}",
|
|
||||||
"followers_url": "https://api.github.com/users/crazy-max/followers",
|
|
||||||
"following_url": "https://api.github.com/users/crazy-max/following{/other_user}",
|
|
||||||
"gists_url": "https://api.github.com/users/crazy-max/gists{/gist_id}",
|
|
||||||
"gravatar_id": "",
|
|
||||||
"html_url": "https://github.com/crazy-max",
|
|
||||||
"id": 1951866,
|
|
||||||
"login": "crazy-max",
|
|
||||||
"node_id": "MDQ6VXNlcjE5NTE4NjY=",
|
|
||||||
"organizations_url": "https://api.github.com/users/crazy-max/orgs",
|
|
||||||
"received_events_url": "https://api.github.com/users/crazy-max/received_events",
|
|
||||||
"repos_url": "https://api.github.com/users/crazy-max/repos",
|
|
||||||
"site_admin": false,
|
|
||||||
"starred_url": "https://api.github.com/users/crazy-max/starred{/owner}{/repo}",
|
|
||||||
"subscriptions_url": "https://api.github.com/users/crazy-max/subscriptions",
|
|
||||||
"type": "User",
|
|
||||||
"url": "https://api.github.com/users/crazy-max"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"organization": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/5429470?v=4",
|
|
||||||
"description": "Docker helps developers bring their ideas to life by conquering the complexity of app development.",
|
|
||||||
"events_url": "https://api.github.com/orgs/docker/events",
|
|
||||||
"hooks_url": "https://api.github.com/orgs/docker/hooks",
|
|
||||||
"id": 5429470,
|
|
||||||
"issues_url": "https://api.github.com/orgs/docker/issues",
|
|
||||||
"login": "docker",
|
|
||||||
"members_url": "https://api.github.com/orgs/docker/members{/member}",
|
|
||||||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjU0Mjk0NzA=",
|
|
||||||
"public_members_url": "https://api.github.com/orgs/docker/public_members{/member}",
|
|
||||||
"repos_url": "https://api.github.com/orgs/docker/repos",
|
|
||||||
"url": "https://api.github.com/orgs/docker"
|
|
||||||
},
|
|
||||||
"repository": {
|
|
||||||
"allow_forking": true,
|
|
||||||
"archive_url": "https://api.github.com/repos/docker/test-docker-action/{archive_format}{/ref}",
|
|
||||||
"archived": false,
|
|
||||||
"assignees_url": "https://api.github.com/repos/docker/test-docker-action/assignees{/user}",
|
|
||||||
"blobs_url": "https://api.github.com/repos/docker/test-docker-action/git/blobs{/sha}",
|
|
||||||
"branches_url": "https://api.github.com/repos/docker/test-docker-action/branches{/branch}",
|
|
||||||
"clone_url": "https://github.com/docker/test-docker-action.git",
|
|
||||||
"collaborators_url": "https://api.github.com/repos/docker/test-docker-action/collaborators{/collaborator}",
|
|
||||||
"comments_url": "https://api.github.com/repos/docker/test-docker-action/comments{/number}",
|
|
||||||
"commits_url": "https://api.github.com/repos/docker/test-docker-action/commits{/sha}",
|
|
||||||
"compare_url": "https://api.github.com/repos/docker/test-docker-action/compare/{base}...{head}",
|
|
||||||
"contents_url": "https://api.github.com/repos/docker/test-docker-action/contents/{+path}",
|
|
||||||
"contributors_url": "https://api.github.com/repos/docker/test-docker-action/contributors",
|
|
||||||
"created_at": "2020-08-07T09:23:00Z",
|
|
||||||
"default_branch": "master",
|
|
||||||
"deployments_url": "https://api.github.com/repos/docker/test-docker-action/deployments",
|
|
||||||
"description": "Test \"Docker\" Actions",
|
|
||||||
"disabled": false,
|
|
||||||
"downloads_url": "https://api.github.com/repos/docker/test-docker-action/downloads",
|
|
||||||
"events_url": "https://api.github.com/repos/docker/test-docker-action/events",
|
|
||||||
"fork": false,
|
|
||||||
"forks": 1,
|
|
||||||
"forks_count": 1,
|
|
||||||
"forks_url": "https://api.github.com/repos/docker/test-docker-action/forks",
|
|
||||||
"full_name": "docker/test-docker-action",
|
|
||||||
"git_commits_url": "https://api.github.com/repos/docker/test-docker-action/git/commits{/sha}",
|
|
||||||
"git_refs_url": "https://api.github.com/repos/docker/test-docker-action/git/refs{/sha}",
|
|
||||||
"git_tags_url": "https://api.github.com/repos/docker/test-docker-action/git/tags{/sha}",
|
|
||||||
"git_url": "git://github.com/docker/test-docker-action.git",
|
|
||||||
"has_downloads": true,
|
|
||||||
"has_issues": true,
|
|
||||||
"has_pages": false,
|
|
||||||
"has_projects": true,
|
|
||||||
"has_wiki": true,
|
|
||||||
"homepage": "",
|
|
||||||
"hooks_url": "https://api.github.com/repos/docker/test-docker-action/hooks",
|
|
||||||
"html_url": "https://github.com/docker/test-docker-action",
|
|
||||||
"id": 285789493,
|
|
||||||
"is_template": false,
|
|
||||||
"issue_comment_url": "https://api.github.com/repos/docker/test-docker-action/issues/comments{/number}",
|
|
||||||
"issue_events_url": "https://api.github.com/repos/docker/test-docker-action/issues/events{/number}",
|
|
||||||
"issues_url": "https://api.github.com/repos/docker/test-docker-action/issues{/number}",
|
|
||||||
"keys_url": "https://api.github.com/repos/docker/test-docker-action/keys{/key_id}",
|
|
||||||
"labels_url": "https://api.github.com/repos/docker/test-docker-action/labels{/name}",
|
|
||||||
"language": "JavaScript",
|
|
||||||
"languages_url": "https://api.github.com/repos/docker/test-docker-action/languages",
|
|
||||||
"license": {
|
|
||||||
"key": "mit",
|
|
||||||
"name": "MIT License",
|
|
||||||
"node_id": "MDc6TGljZW5zZTEz",
|
|
||||||
"spdx_id": "MIT",
|
|
||||||
"url": "https://api.github.com/licenses/mit"
|
|
||||||
},
|
|
||||||
"merges_url": "https://api.github.com/repos/docker/test-docker-action/merges",
|
|
||||||
"milestones_url": "https://api.github.com/repos/docker/test-docker-action/milestones{/number}",
|
|
||||||
"mirror_url": null,
|
|
||||||
"name": "test-docker-action",
|
|
||||||
"node_id": "MDEwOlJlcG9zaXRvcnkyODU3ODk0OTM=",
|
|
||||||
"notifications_url": "https://api.github.com/repos/docker/test-docker-action/notifications{?since,all,participating}",
|
|
||||||
"open_issues": 4,
|
|
||||||
"open_issues_count": 4,
|
|
||||||
"owner": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/5429470?v=4",
|
|
||||||
"events_url": "https://api.github.com/users/docker/events{/privacy}",
|
|
||||||
"followers_url": "https://api.github.com/users/docker/followers",
|
|
||||||
"following_url": "https://api.github.com/users/docker/following{/other_user}",
|
|
||||||
"gists_url": "https://api.github.com/users/docker/gists{/gist_id}",
|
|
||||||
"gravatar_id": "",
|
|
||||||
"html_url": "https://github.com/docker",
|
|
||||||
"id": 5429470,
|
|
||||||
"login": "docker",
|
|
||||||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjU0Mjk0NzA=",
|
|
||||||
"organizations_url": "https://api.github.com/users/docker/orgs",
|
|
||||||
"received_events_url": "https://api.github.com/users/docker/received_events",
|
|
||||||
"repos_url": "https://api.github.com/users/docker/repos",
|
|
||||||
"site_admin": false,
|
|
||||||
"starred_url": "https://api.github.com/users/docker/starred{/owner}{/repo}",
|
|
||||||
"subscriptions_url": "https://api.github.com/users/docker/subscriptions",
|
|
||||||
"type": "Organization",
|
|
||||||
"url": "https://api.github.com/users/docker"
|
|
||||||
},
|
|
||||||
"private": true,
|
|
||||||
"pulls_url": "https://api.github.com/repos/docker/test-docker-action/pulls{/number}",
|
|
||||||
"pushed_at": "2022-04-19T09:04:50Z",
|
|
||||||
"releases_url": "https://api.github.com/repos/docker/test-docker-action/releases{/id}",
|
|
||||||
"size": 796,
|
|
||||||
"ssh_url": "git@github.com:docker/test-docker-action.git",
|
|
||||||
"stargazers_count": 0,
|
|
||||||
"stargazers_url": "https://api.github.com/repos/docker/test-docker-action/stargazers",
|
|
||||||
"statuses_url": "https://api.github.com/repos/docker/test-docker-action/statuses/{sha}",
|
|
||||||
"subscribers_url": "https://api.github.com/repos/docker/test-docker-action/subscribers",
|
|
||||||
"subscription_url": "https://api.github.com/repos/docker/test-docker-action/subscription",
|
|
||||||
"svn_url": "https://github.com/docker/test-docker-action",
|
|
||||||
"tags_url": "https://api.github.com/repos/docker/test-docker-action/tags",
|
|
||||||
"teams_url": "https://api.github.com/repos/docker/test-docker-action/teams",
|
|
||||||
"topics": [],
|
|
||||||
"trees_url": "https://api.github.com/repos/docker/test-docker-action/git/trees{/sha}",
|
|
||||||
"updated_at": "2022-04-19T09:05:09Z",
|
|
||||||
"url": "https://api.github.com/repos/docker/test-docker-action",
|
|
||||||
"visibility": "private",
|
|
||||||
"watchers": 0,
|
|
||||||
"watchers_count": 0
|
|
||||||
},
|
|
||||||
"sender": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/1951866?v=4",
|
|
||||||
"events_url": "https://api.github.com/users/crazy-max/events{/privacy}",
|
|
||||||
"followers_url": "https://api.github.com/users/crazy-max/followers",
|
|
||||||
"following_url": "https://api.github.com/users/crazy-max/following{/other_user}",
|
|
||||||
"gists_url": "https://api.github.com/users/crazy-max/gists{/gist_id}",
|
|
||||||
"gravatar_id": "",
|
|
||||||
"html_url": "https://github.com/crazy-max",
|
|
||||||
"id": 1951866,
|
|
||||||
"login": "crazy-max",
|
|
||||||
"node_id": "MDQ6VXNlcjE5NTE4NjY=",
|
|
||||||
"organizations_url": "https://api.github.com/users/crazy-max/orgs",
|
|
||||||
"received_events_url": "https://api.github.com/users/crazy-max/received_events",
|
|
||||||
"repos_url": "https://api.github.com/users/crazy-max/repos",
|
|
||||||
"site_admin": false,
|
|
||||||
"starred_url": "https://api.github.com/users/crazy-max/starred{/owner}{/repo}",
|
|
||||||
"subscriptions_url": "https://api.github.com/users/crazy-max/subscriptions",
|
|
||||||
"type": "User",
|
|
||||||
"url": "https://api.github.com/users/crazy-max"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,30 +0,0 @@
|
|||||||
GITHUB_ACTION=__crazy-max_ghaction-dump-context
|
|
||||||
GITHUB_ACTIONS=true
|
|
||||||
GITHUB_ACTION_PATH=/home/runner/work/_actions/crazy-max/ghaction-dump-context/v1
|
|
||||||
GITHUB_ACTION_REF=
|
|
||||||
GITHUB_ACTION_REPOSITORY=
|
|
||||||
GITHUB_ACTOR=crazy-max
|
|
||||||
GITHUB_API_URL=https://api.github.com
|
|
||||||
GITHUB_BASE_REF=
|
|
||||||
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_940c04a5-537a-4401-afe6-1f044e1d3836
|
|
||||||
GITHUB_EVENT_NAME=discussion
|
|
||||||
GITHUB_EVENT_PATH=./__tests__/fixtures/event_discussion_pinned.json
|
|
||||||
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
|
|
||||||
GITHUB_HEAD_REF=
|
|
||||||
GITHUB_JOB=test
|
|
||||||
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_940c04a5-537a-4401-afe6-1f044e1d3836
|
|
||||||
GITHUB_REF=refs/heads/master
|
|
||||||
GITHUB_REF_NAME=master
|
|
||||||
GITHUB_REF_PROTECTED=false
|
|
||||||
GITHUB_REF_TYPE=branch
|
|
||||||
GITHUB_REPOSITORY=docker/test-docker-action
|
|
||||||
GITHUB_REPOSITORY_OWNER=docker
|
|
||||||
GITHUB_RETENTION_DAYS=90
|
|
||||||
GITHUB_RUN_ATTEMPT=1
|
|
||||||
GITHUB_RUN_ID=2188642074
|
|
||||||
GITHUB_RUN_NUMBER=8
|
|
||||||
GITHUB_SERVER_URL=https://github.com
|
|
||||||
GITHUB_SHA=266574110acf203503badf966df2ea24b5d732d7
|
|
||||||
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_940c04a5-537a-4401-afe6-1f044e1d3836
|
|
||||||
GITHUB_WORKFLOW=metadata
|
|
||||||
GITHUB_WORKSPACE=/home/runner/work/test-docker-action/test-docker-action
|
|
@ -1,205 +0,0 @@
|
|||||||
{
|
|
||||||
"action": "pinned",
|
|
||||||
"discussion": {
|
|
||||||
"active_lock_reason": null,
|
|
||||||
"answer_chosen_at": null,
|
|
||||||
"answer_chosen_by": null,
|
|
||||||
"answer_html_url": null,
|
|
||||||
"author_association": "COLLABORATOR",
|
|
||||||
"body": "bar",
|
|
||||||
"category": {
|
|
||||||
"created_at": "2022-04-19T11:05:12.000+02:00",
|
|
||||||
"description": "Chat about anything and everything here",
|
|
||||||
"emoji": ":speech_balloon:",
|
|
||||||
"id": 37396924,
|
|
||||||
"is_answerable": false,
|
|
||||||
"name": "General",
|
|
||||||
"node_id": "DIC_kwDOEQjNNc4COqG8",
|
|
||||||
"repository_id": 285789493,
|
|
||||||
"slug": "general",
|
|
||||||
"updated_at": "2022-04-19T11:05:12.000+02:00"
|
|
||||||
},
|
|
||||||
"comments": 0,
|
|
||||||
"created_at": "2022-04-19T09:07:32Z",
|
|
||||||
"html_url": "https://github.com/docker/test-docker-action/discussions/13",
|
|
||||||
"id": 4019118,
|
|
||||||
"locked": false,
|
|
||||||
"node_id": "D_kwDOEQjNNc4APVOu",
|
|
||||||
"number": 13,
|
|
||||||
"reactions": {
|
|
||||||
"+1": 0,
|
|
||||||
"-1": 0,
|
|
||||||
"confused": 0,
|
|
||||||
"eyes": 0,
|
|
||||||
"heart": 0,
|
|
||||||
"hooray": 0,
|
|
||||||
"laugh": 0,
|
|
||||||
"rocket": 0,
|
|
||||||
"total_count": 0,
|
|
||||||
"url": "https://api.github.com/repos/docker/test-docker-action/discussions/13/reactions"
|
|
||||||
},
|
|
||||||
"repository_url": "https://api.github.com/repos/docker/test-docker-action",
|
|
||||||
"state": "open",
|
|
||||||
"timeline_url": "https://api.github.com/repos/docker/test-docker-action/discussions/13/timeline",
|
|
||||||
"title": "foo",
|
|
||||||
"updated_at": "2022-04-19T09:07:32Z",
|
|
||||||
"user": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/1951866?v=4",
|
|
||||||
"events_url": "https://api.github.com/users/crazy-max/events{/privacy}",
|
|
||||||
"followers_url": "https://api.github.com/users/crazy-max/followers",
|
|
||||||
"following_url": "https://api.github.com/users/crazy-max/following{/other_user}",
|
|
||||||
"gists_url": "https://api.github.com/users/crazy-max/gists{/gist_id}",
|
|
||||||
"gravatar_id": "",
|
|
||||||
"html_url": "https://github.com/crazy-max",
|
|
||||||
"id": 1951866,
|
|
||||||
"login": "crazy-max",
|
|
||||||
"node_id": "MDQ6VXNlcjE5NTE4NjY=",
|
|
||||||
"organizations_url": "https://api.github.com/users/crazy-max/orgs",
|
|
||||||
"received_events_url": "https://api.github.com/users/crazy-max/received_events",
|
|
||||||
"repos_url": "https://api.github.com/users/crazy-max/repos",
|
|
||||||
"site_admin": false,
|
|
||||||
"starred_url": "https://api.github.com/users/crazy-max/starred{/owner}{/repo}",
|
|
||||||
"subscriptions_url": "https://api.github.com/users/crazy-max/subscriptions",
|
|
||||||
"type": "User",
|
|
||||||
"url": "https://api.github.com/users/crazy-max"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"organization": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/5429470?v=4",
|
|
||||||
"description": "Docker helps developers bring their ideas to life by conquering the complexity of app development.",
|
|
||||||
"events_url": "https://api.github.com/orgs/docker/events",
|
|
||||||
"hooks_url": "https://api.github.com/orgs/docker/hooks",
|
|
||||||
"id": 5429470,
|
|
||||||
"issues_url": "https://api.github.com/orgs/docker/issues",
|
|
||||||
"login": "docker",
|
|
||||||
"members_url": "https://api.github.com/orgs/docker/members{/member}",
|
|
||||||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjU0Mjk0NzA=",
|
|
||||||
"public_members_url": "https://api.github.com/orgs/docker/public_members{/member}",
|
|
||||||
"repos_url": "https://api.github.com/orgs/docker/repos",
|
|
||||||
"url": "https://api.github.com/orgs/docker"
|
|
||||||
},
|
|
||||||
"repository": {
|
|
||||||
"allow_forking": true,
|
|
||||||
"archive_url": "https://api.github.com/repos/docker/test-docker-action/{archive_format}{/ref}",
|
|
||||||
"archived": false,
|
|
||||||
"assignees_url": "https://api.github.com/repos/docker/test-docker-action/assignees{/user}",
|
|
||||||
"blobs_url": "https://api.github.com/repos/docker/test-docker-action/git/blobs{/sha}",
|
|
||||||
"branches_url": "https://api.github.com/repos/docker/test-docker-action/branches{/branch}",
|
|
||||||
"clone_url": "https://github.com/docker/test-docker-action.git",
|
|
||||||
"collaborators_url": "https://api.github.com/repos/docker/test-docker-action/collaborators{/collaborator}",
|
|
||||||
"comments_url": "https://api.github.com/repos/docker/test-docker-action/comments{/number}",
|
|
||||||
"commits_url": "https://api.github.com/repos/docker/test-docker-action/commits{/sha}",
|
|
||||||
"compare_url": "https://api.github.com/repos/docker/test-docker-action/compare/{base}...{head}",
|
|
||||||
"contents_url": "https://api.github.com/repos/docker/test-docker-action/contents/{+path}",
|
|
||||||
"contributors_url": "https://api.github.com/repos/docker/test-docker-action/contributors",
|
|
||||||
"created_at": "2020-08-07T09:23:00Z",
|
|
||||||
"default_branch": "master",
|
|
||||||
"deployments_url": "https://api.github.com/repos/docker/test-docker-action/deployments",
|
|
||||||
"description": "Test \"Docker\" Actions",
|
|
||||||
"disabled": false,
|
|
||||||
"downloads_url": "https://api.github.com/repos/docker/test-docker-action/downloads",
|
|
||||||
"events_url": "https://api.github.com/repos/docker/test-docker-action/events",
|
|
||||||
"fork": false,
|
|
||||||
"forks": 1,
|
|
||||||
"forks_count": 1,
|
|
||||||
"forks_url": "https://api.github.com/repos/docker/test-docker-action/forks",
|
|
||||||
"full_name": "docker/test-docker-action",
|
|
||||||
"git_commits_url": "https://api.github.com/repos/docker/test-docker-action/git/commits{/sha}",
|
|
||||||
"git_refs_url": "https://api.github.com/repos/docker/test-docker-action/git/refs{/sha}",
|
|
||||||
"git_tags_url": "https://api.github.com/repos/docker/test-docker-action/git/tags{/sha}",
|
|
||||||
"git_url": "git://github.com/docker/test-docker-action.git",
|
|
||||||
"has_downloads": true,
|
|
||||||
"has_issues": true,
|
|
||||||
"has_pages": false,
|
|
||||||
"has_projects": true,
|
|
||||||
"has_wiki": true,
|
|
||||||
"homepage": "",
|
|
||||||
"hooks_url": "https://api.github.com/repos/docker/test-docker-action/hooks",
|
|
||||||
"html_url": "https://github.com/docker/test-docker-action",
|
|
||||||
"id": 285789493,
|
|
||||||
"is_template": false,
|
|
||||||
"issue_comment_url": "https://api.github.com/repos/docker/test-docker-action/issues/comments{/number}",
|
|
||||||
"issue_events_url": "https://api.github.com/repos/docker/test-docker-action/issues/events{/number}",
|
|
||||||
"issues_url": "https://api.github.com/repos/docker/test-docker-action/issues{/number}",
|
|
||||||
"keys_url": "https://api.github.com/repos/docker/test-docker-action/keys{/key_id}",
|
|
||||||
"labels_url": "https://api.github.com/repos/docker/test-docker-action/labels{/name}",
|
|
||||||
"language": "JavaScript",
|
|
||||||
"languages_url": "https://api.github.com/repos/docker/test-docker-action/languages",
|
|
||||||
"license": {
|
|
||||||
"key": "mit",
|
|
||||||
"name": "MIT License",
|
|
||||||
"node_id": "MDc6TGljZW5zZTEz",
|
|
||||||
"spdx_id": "MIT",
|
|
||||||
"url": "https://api.github.com/licenses/mit"
|
|
||||||
},
|
|
||||||
"merges_url": "https://api.github.com/repos/docker/test-docker-action/merges",
|
|
||||||
"milestones_url": "https://api.github.com/repos/docker/test-docker-action/milestones{/number}",
|
|
||||||
"mirror_url": null,
|
|
||||||
"name": "test-docker-action",
|
|
||||||
"node_id": "MDEwOlJlcG9zaXRvcnkyODU3ODk0OTM=",
|
|
||||||
"notifications_url": "https://api.github.com/repos/docker/test-docker-action/notifications{?since,all,participating}",
|
|
||||||
"open_issues": 4,
|
|
||||||
"open_issues_count": 4,
|
|
||||||
"owner": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/5429470?v=4",
|
|
||||||
"events_url": "https://api.github.com/users/docker/events{/privacy}",
|
|
||||||
"followers_url": "https://api.github.com/users/docker/followers",
|
|
||||||
"following_url": "https://api.github.com/users/docker/following{/other_user}",
|
|
||||||
"gists_url": "https://api.github.com/users/docker/gists{/gist_id}",
|
|
||||||
"gravatar_id": "",
|
|
||||||
"html_url": "https://github.com/docker",
|
|
||||||
"id": 5429470,
|
|
||||||
"login": "docker",
|
|
||||||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjU0Mjk0NzA=",
|
|
||||||
"organizations_url": "https://api.github.com/users/docker/orgs",
|
|
||||||
"received_events_url": "https://api.github.com/users/docker/received_events",
|
|
||||||
"repos_url": "https://api.github.com/users/docker/repos",
|
|
||||||
"site_admin": false,
|
|
||||||
"starred_url": "https://api.github.com/users/docker/starred{/owner}{/repo}",
|
|
||||||
"subscriptions_url": "https://api.github.com/users/docker/subscriptions",
|
|
||||||
"type": "Organization",
|
|
||||||
"url": "https://api.github.com/users/docker"
|
|
||||||
},
|
|
||||||
"private": true,
|
|
||||||
"pulls_url": "https://api.github.com/repos/docker/test-docker-action/pulls{/number}",
|
|
||||||
"pushed_at": "2022-04-19T09:04:50Z",
|
|
||||||
"releases_url": "https://api.github.com/repos/docker/test-docker-action/releases{/id}",
|
|
||||||
"size": 796,
|
|
||||||
"ssh_url": "git@github.com:docker/test-docker-action.git",
|
|
||||||
"stargazers_count": 0,
|
|
||||||
"stargazers_url": "https://api.github.com/repos/docker/test-docker-action/stargazers",
|
|
||||||
"statuses_url": "https://api.github.com/repos/docker/test-docker-action/statuses/{sha}",
|
|
||||||
"subscribers_url": "https://api.github.com/repos/docker/test-docker-action/subscribers",
|
|
||||||
"subscription_url": "https://api.github.com/repos/docker/test-docker-action/subscription",
|
|
||||||
"svn_url": "https://github.com/docker/test-docker-action",
|
|
||||||
"tags_url": "https://api.github.com/repos/docker/test-docker-action/tags",
|
|
||||||
"teams_url": "https://api.github.com/repos/docker/test-docker-action/teams",
|
|
||||||
"topics": [],
|
|
||||||
"trees_url": "https://api.github.com/repos/docker/test-docker-action/git/trees{/sha}",
|
|
||||||
"updated_at": "2022-04-19T09:05:09Z",
|
|
||||||
"url": "https://api.github.com/repos/docker/test-docker-action",
|
|
||||||
"visibility": "private",
|
|
||||||
"watchers": 0,
|
|
||||||
"watchers_count": 0
|
|
||||||
},
|
|
||||||
"sender": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/1951866?v=4",
|
|
||||||
"events_url": "https://api.github.com/users/crazy-max/events{/privacy}",
|
|
||||||
"followers_url": "https://api.github.com/users/crazy-max/followers",
|
|
||||||
"following_url": "https://api.github.com/users/crazy-max/following{/other_user}",
|
|
||||||
"gists_url": "https://api.github.com/users/crazy-max/gists{/gist_id}",
|
|
||||||
"gravatar_id": "",
|
|
||||||
"html_url": "https://github.com/crazy-max",
|
|
||||||
"id": 1951866,
|
|
||||||
"login": "crazy-max",
|
|
||||||
"node_id": "MDQ6VXNlcjE5NTE4NjY=",
|
|
||||||
"organizations_url": "https://api.github.com/users/crazy-max/orgs",
|
|
||||||
"received_events_url": "https://api.github.com/users/crazy-max/received_events",
|
|
||||||
"repos_url": "https://api.github.com/users/crazy-max/repos",
|
|
||||||
"site_admin": false,
|
|
||||||
"starred_url": "https://api.github.com/users/crazy-max/starred{/owner}{/repo}",
|
|
||||||
"subscriptions_url": "https://api.github.com/users/crazy-max/subscriptions",
|
|
||||||
"type": "User",
|
|
||||||
"url": "https://api.github.com/users/crazy-max"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,30 +0,0 @@
|
|||||||
GITHUB_ACTION=__crazy-max_ghaction-dump-context
|
|
||||||
GITHUB_ACTIONS=true
|
|
||||||
GITHUB_ACTION_PATH=/home/runner/work/_actions/crazy-max/ghaction-dump-context/v1
|
|
||||||
GITHUB_ACTION_REF=
|
|
||||||
GITHUB_ACTION_REPOSITORY=
|
|
||||||
GITHUB_ACTOR=crazy-max
|
|
||||||
GITHUB_API_URL=https://api.github.com
|
|
||||||
GITHUB_BASE_REF=
|
|
||||||
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_b598b668-2cad-465a-b526-d21912b7d2b2
|
|
||||||
GITHUB_EVENT_NAME=issues
|
|
||||||
GITHUB_EVENT_PATH=./__tests__/fixtures/event_issue_opened.json
|
|
||||||
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
|
|
||||||
GITHUB_HEAD_REF=
|
|
||||||
GITHUB_JOB=test
|
|
||||||
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_b598b668-2cad-465a-b526-d21912b7d2b2
|
|
||||||
GITHUB_REF=refs/heads/master
|
|
||||||
GITHUB_REF_NAME=master
|
|
||||||
GITHUB_REF_PROTECTED=false
|
|
||||||
GITHUB_REF_TYPE=branch
|
|
||||||
GITHUB_REPOSITORY=docker/test-docker-action
|
|
||||||
GITHUB_REPOSITORY_OWNER=docker
|
|
||||||
GITHUB_RETENTION_DAYS=90
|
|
||||||
GITHUB_RUN_ATTEMPT=1
|
|
||||||
GITHUB_RUN_ID=2188657159
|
|
||||||
GITHUB_RUN_NUMBER=9
|
|
||||||
GITHUB_SERVER_URL=https://github.com
|
|
||||||
GITHUB_SHA=266574110acf203503badf966df2ea24b5d732d7
|
|
||||||
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_b598b668-2cad-465a-b526-d21912b7d2b2
|
|
||||||
GITHUB_WORKFLOW=metadata
|
|
||||||
GITHUB_WORKSPACE=/home/runner/work/test-docker-action/test-docker-action
|
|
@ -1,200 +0,0 @@
|
|||||||
{
|
|
||||||
"action": "opened",
|
|
||||||
"issue": {
|
|
||||||
"active_lock_reason": null,
|
|
||||||
"assignee": null,
|
|
||||||
"assignees": [],
|
|
||||||
"author_association": "COLLABORATOR",
|
|
||||||
"body": "bar",
|
|
||||||
"closed_at": null,
|
|
||||||
"comments": 0,
|
|
||||||
"comments_url": "https://api.github.com/repos/docker/test-docker-action/issues/14/comments",
|
|
||||||
"created_at": "2022-04-19T09:10:26Z",
|
|
||||||
"events_url": "https://api.github.com/repos/docker/test-docker-action/issues/14/events",
|
|
||||||
"html_url": "https://github.com/docker/test-docker-action/issues/14",
|
|
||||||
"id": 1208034626,
|
|
||||||
"labels": [],
|
|
||||||
"labels_url": "https://api.github.com/repos/docker/test-docker-action/issues/14/labels{/name}",
|
|
||||||
"locked": false,
|
|
||||||
"milestone": null,
|
|
||||||
"node_id": "I_kwDOEQjNNc5IASVC",
|
|
||||||
"number": 14,
|
|
||||||
"performed_via_github_app": null,
|
|
||||||
"reactions": {
|
|
||||||
"+1": 0,
|
|
||||||
"-1": 0,
|
|
||||||
"confused": 0,
|
|
||||||
"eyes": 0,
|
|
||||||
"heart": 0,
|
|
||||||
"hooray": 0,
|
|
||||||
"laugh": 0,
|
|
||||||
"rocket": 0,
|
|
||||||
"total_count": 0,
|
|
||||||
"url": "https://api.github.com/repos/docker/test-docker-action/issues/14/reactions"
|
|
||||||
},
|
|
||||||
"repository_url": "https://api.github.com/repos/docker/test-docker-action",
|
|
||||||
"state": "open",
|
|
||||||
"timeline_url": "https://api.github.com/repos/docker/test-docker-action/issues/14/timeline",
|
|
||||||
"title": "foo",
|
|
||||||
"updated_at": "2022-04-19T09:10:26Z",
|
|
||||||
"url": "https://api.github.com/repos/docker/test-docker-action/issues/14",
|
|
||||||
"user": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/1951866?v=4",
|
|
||||||
"events_url": "https://api.github.com/users/crazy-max/events{/privacy}",
|
|
||||||
"followers_url": "https://api.github.com/users/crazy-max/followers",
|
|
||||||
"following_url": "https://api.github.com/users/crazy-max/following{/other_user}",
|
|
||||||
"gists_url": "https://api.github.com/users/crazy-max/gists{/gist_id}",
|
|
||||||
"gravatar_id": "",
|
|
||||||
"html_url": "https://github.com/crazy-max",
|
|
||||||
"id": 1951866,
|
|
||||||
"login": "crazy-max",
|
|
||||||
"node_id": "MDQ6VXNlcjE5NTE4NjY=",
|
|
||||||
"organizations_url": "https://api.github.com/users/crazy-max/orgs",
|
|
||||||
"received_events_url": "https://api.github.com/users/crazy-max/received_events",
|
|
||||||
"repos_url": "https://api.github.com/users/crazy-max/repos",
|
|
||||||
"site_admin": false,
|
|
||||||
"starred_url": "https://api.github.com/users/crazy-max/starred{/owner}{/repo}",
|
|
||||||
"subscriptions_url": "https://api.github.com/users/crazy-max/subscriptions",
|
|
||||||
"type": "User",
|
|
||||||
"url": "https://api.github.com/users/crazy-max"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"organization": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/5429470?v=4",
|
|
||||||
"description": "Docker helps developers bring their ideas to life by conquering the complexity of app development.",
|
|
||||||
"events_url": "https://api.github.com/orgs/docker/events",
|
|
||||||
"hooks_url": "https://api.github.com/orgs/docker/hooks",
|
|
||||||
"id": 5429470,
|
|
||||||
"issues_url": "https://api.github.com/orgs/docker/issues",
|
|
||||||
"login": "docker",
|
|
||||||
"members_url": "https://api.github.com/orgs/docker/members{/member}",
|
|
||||||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjU0Mjk0NzA=",
|
|
||||||
"public_members_url": "https://api.github.com/orgs/docker/public_members{/member}",
|
|
||||||
"repos_url": "https://api.github.com/orgs/docker/repos",
|
|
||||||
"url": "https://api.github.com/orgs/docker"
|
|
||||||
},
|
|
||||||
"repository": {
|
|
||||||
"allow_forking": true,
|
|
||||||
"archive_url": "https://api.github.com/repos/docker/test-docker-action/{archive_format}{/ref}",
|
|
||||||
"archived": false,
|
|
||||||
"assignees_url": "https://api.github.com/repos/docker/test-docker-action/assignees{/user}",
|
|
||||||
"blobs_url": "https://api.github.com/repos/docker/test-docker-action/git/blobs{/sha}",
|
|
||||||
"branches_url": "https://api.github.com/repos/docker/test-docker-action/branches{/branch}",
|
|
||||||
"clone_url": "https://github.com/docker/test-docker-action.git",
|
|
||||||
"collaborators_url": "https://api.github.com/repos/docker/test-docker-action/collaborators{/collaborator}",
|
|
||||||
"comments_url": "https://api.github.com/repos/docker/test-docker-action/comments{/number}",
|
|
||||||
"commits_url": "https://api.github.com/repos/docker/test-docker-action/commits{/sha}",
|
|
||||||
"compare_url": "https://api.github.com/repos/docker/test-docker-action/compare/{base}...{head}",
|
|
||||||
"contents_url": "https://api.github.com/repos/docker/test-docker-action/contents/{+path}",
|
|
||||||
"contributors_url": "https://api.github.com/repos/docker/test-docker-action/contributors",
|
|
||||||
"created_at": "2020-08-07T09:23:00Z",
|
|
||||||
"default_branch": "master",
|
|
||||||
"deployments_url": "https://api.github.com/repos/docker/test-docker-action/deployments",
|
|
||||||
"description": "Test \"Docker\" Actions",
|
|
||||||
"disabled": false,
|
|
||||||
"downloads_url": "https://api.github.com/repos/docker/test-docker-action/downloads",
|
|
||||||
"events_url": "https://api.github.com/repos/docker/test-docker-action/events",
|
|
||||||
"fork": false,
|
|
||||||
"forks": 1,
|
|
||||||
"forks_count": 1,
|
|
||||||
"forks_url": "https://api.github.com/repos/docker/test-docker-action/forks",
|
|
||||||
"full_name": "docker/test-docker-action",
|
|
||||||
"git_commits_url": "https://api.github.com/repos/docker/test-docker-action/git/commits{/sha}",
|
|
||||||
"git_refs_url": "https://api.github.com/repos/docker/test-docker-action/git/refs{/sha}",
|
|
||||||
"git_tags_url": "https://api.github.com/repos/docker/test-docker-action/git/tags{/sha}",
|
|
||||||
"git_url": "git://github.com/docker/test-docker-action.git",
|
|
||||||
"has_downloads": true,
|
|
||||||
"has_issues": true,
|
|
||||||
"has_pages": false,
|
|
||||||
"has_projects": true,
|
|
||||||
"has_wiki": true,
|
|
||||||
"homepage": "",
|
|
||||||
"hooks_url": "https://api.github.com/repos/docker/test-docker-action/hooks",
|
|
||||||
"html_url": "https://github.com/docker/test-docker-action",
|
|
||||||
"id": 285789493,
|
|
||||||
"is_template": false,
|
|
||||||
"issue_comment_url": "https://api.github.com/repos/docker/test-docker-action/issues/comments{/number}",
|
|
||||||
"issue_events_url": "https://api.github.com/repos/docker/test-docker-action/issues/events{/number}",
|
|
||||||
"issues_url": "https://api.github.com/repos/docker/test-docker-action/issues{/number}",
|
|
||||||
"keys_url": "https://api.github.com/repos/docker/test-docker-action/keys{/key_id}",
|
|
||||||
"labels_url": "https://api.github.com/repos/docker/test-docker-action/labels{/name}",
|
|
||||||
"language": "JavaScript",
|
|
||||||
"languages_url": "https://api.github.com/repos/docker/test-docker-action/languages",
|
|
||||||
"license": {
|
|
||||||
"key": "mit",
|
|
||||||
"name": "MIT License",
|
|
||||||
"node_id": "MDc6TGljZW5zZTEz",
|
|
||||||
"spdx_id": "MIT",
|
|
||||||
"url": "https://api.github.com/licenses/mit"
|
|
||||||
},
|
|
||||||
"merges_url": "https://api.github.com/repos/docker/test-docker-action/merges",
|
|
||||||
"milestones_url": "https://api.github.com/repos/docker/test-docker-action/milestones{/number}",
|
|
||||||
"mirror_url": null,
|
|
||||||
"name": "test-docker-action",
|
|
||||||
"node_id": "MDEwOlJlcG9zaXRvcnkyODU3ODk0OTM=",
|
|
||||||
"notifications_url": "https://api.github.com/repos/docker/test-docker-action/notifications{?since,all,participating}",
|
|
||||||
"open_issues": 5,
|
|
||||||
"open_issues_count": 5,
|
|
||||||
"owner": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/5429470?v=4",
|
|
||||||
"events_url": "https://api.github.com/users/docker/events{/privacy}",
|
|
||||||
"followers_url": "https://api.github.com/users/docker/followers",
|
|
||||||
"following_url": "https://api.github.com/users/docker/following{/other_user}",
|
|
||||||
"gists_url": "https://api.github.com/users/docker/gists{/gist_id}",
|
|
||||||
"gravatar_id": "",
|
|
||||||
"html_url": "https://github.com/docker",
|
|
||||||
"id": 5429470,
|
|
||||||
"login": "docker",
|
|
||||||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjU0Mjk0NzA=",
|
|
||||||
"organizations_url": "https://api.github.com/users/docker/orgs",
|
|
||||||
"received_events_url": "https://api.github.com/users/docker/received_events",
|
|
||||||
"repos_url": "https://api.github.com/users/docker/repos",
|
|
||||||
"site_admin": false,
|
|
||||||
"starred_url": "https://api.github.com/users/docker/starred{/owner}{/repo}",
|
|
||||||
"subscriptions_url": "https://api.github.com/users/docker/subscriptions",
|
|
||||||
"type": "Organization",
|
|
||||||
"url": "https://api.github.com/users/docker"
|
|
||||||
},
|
|
||||||
"private": true,
|
|
||||||
"pulls_url": "https://api.github.com/repos/docker/test-docker-action/pulls{/number}",
|
|
||||||
"pushed_at": "2022-04-19T09:04:50Z",
|
|
||||||
"releases_url": "https://api.github.com/repos/docker/test-docker-action/releases{/id}",
|
|
||||||
"size": 796,
|
|
||||||
"ssh_url": "git@github.com:docker/test-docker-action.git",
|
|
||||||
"stargazers_count": 0,
|
|
||||||
"stargazers_url": "https://api.github.com/repos/docker/test-docker-action/stargazers",
|
|
||||||
"statuses_url": "https://api.github.com/repos/docker/test-docker-action/statuses/{sha}",
|
|
||||||
"subscribers_url": "https://api.github.com/repos/docker/test-docker-action/subscribers",
|
|
||||||
"subscription_url": "https://api.github.com/repos/docker/test-docker-action/subscription",
|
|
||||||
"svn_url": "https://github.com/docker/test-docker-action",
|
|
||||||
"tags_url": "https://api.github.com/repos/docker/test-docker-action/tags",
|
|
||||||
"teams_url": "https://api.github.com/repos/docker/test-docker-action/teams",
|
|
||||||
"topics": [],
|
|
||||||
"trees_url": "https://api.github.com/repos/docker/test-docker-action/git/trees{/sha}",
|
|
||||||
"updated_at": "2022-04-19T09:05:09Z",
|
|
||||||
"url": "https://api.github.com/repos/docker/test-docker-action",
|
|
||||||
"visibility": "private",
|
|
||||||
"watchers": 0,
|
|
||||||
"watchers_count": 0
|
|
||||||
},
|
|
||||||
"sender": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/1951866?v=4",
|
|
||||||
"events_url": "https://api.github.com/users/crazy-max/events{/privacy}",
|
|
||||||
"followers_url": "https://api.github.com/users/crazy-max/followers",
|
|
||||||
"following_url": "https://api.github.com/users/crazy-max/following{/other_user}",
|
|
||||||
"gists_url": "https://api.github.com/users/crazy-max/gists{/gist_id}",
|
|
||||||
"gravatar_id": "",
|
|
||||||
"html_url": "https://github.com/crazy-max",
|
|
||||||
"id": 1951866,
|
|
||||||
"login": "crazy-max",
|
|
||||||
"node_id": "MDQ6VXNlcjE5NTE4NjY=",
|
|
||||||
"organizations_url": "https://api.github.com/users/crazy-max/orgs",
|
|
||||||
"received_events_url": "https://api.github.com/users/crazy-max/received_events",
|
|
||||||
"repos_url": "https://api.github.com/users/crazy-max/repos",
|
|
||||||
"site_admin": false,
|
|
||||||
"starred_url": "https://api.github.com/users/crazy-max/starred{/owner}{/repo}",
|
|
||||||
"subscriptions_url": "https://api.github.com/users/crazy-max/subscriptions",
|
|
||||||
"type": "User",
|
|
||||||
"url": "https://api.github.com/users/crazy-max"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,30 +1,23 @@
|
|||||||
GITHUB_ACTION=__crazy-max_ghaction-dump-context
|
GITHUB_ACTION=crazy-maxghaction-dump-context
|
||||||
GITHUB_ACTIONS=true
|
GITHUB_ACTIONS=true
|
||||||
GITHUB_ACTION_PATH=/home/runner/work/_actions/crazy-max/ghaction-dump-context/v1
|
GITHUB_ACTION_PATH=/home/runner/work/_actions/crazy-max/ghaction-dump-context/v1
|
||||||
GITHUB_ACTION_REF=
|
|
||||||
GITHUB_ACTION_REPOSITORY=
|
|
||||||
GITHUB_ACTOR=crazy-max
|
GITHUB_ACTOR=crazy-max
|
||||||
GITHUB_API_URL=https://api.github.com
|
GITHUB_API_URL=https://api.github.com
|
||||||
GITHUB_BASE_REF=master
|
GITHUB_BASE_REF=master
|
||||||
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_ca953e95-2f41-4926-bc52-a1c8d90e94c1
|
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_e00a951d-2585-4fac-b085-459d80e69a2f
|
||||||
GITHUB_EVENT_NAME=pull_request
|
GITHUB_EVENT_NAME=pull_request
|
||||||
GITHUB_EVENT_PATH=./__tests__/fixtures/event_pull_request.json
|
#GITHUB_EVENT_PATH=/home/runner/work/_temp/_github_workflow/event.json
|
||||||
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
|
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
|
||||||
GITHUB_HEAD_REF=test-pr
|
GITHUB_HEAD_REF=pr
|
||||||
GITHUB_JOB=test
|
GITHUB_JOB=event
|
||||||
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_ca953e95-2f41-4926-bc52-a1c8d90e94c1
|
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_e00a951d-2585-4fac-b085-459d80e69a2f
|
||||||
GITHUB_REF=refs/pull/15/merge
|
GITHUB_REF=refs/pull/2/merge
|
||||||
GITHUB_REF_NAME=15/merge
|
GITHUB_REPOSITORY=crazy-max/test-docker-action
|
||||||
GITHUB_REF_PROTECTED=false
|
GITHUB_REPOSITORY_OWNER=crazy-max
|
||||||
GITHUB_REF_TYPE=branch
|
|
||||||
GITHUB_REPOSITORY=docker/test-docker-action
|
|
||||||
GITHUB_REPOSITORY_OWNER=docker
|
|
||||||
GITHUB_RETENTION_DAYS=90
|
GITHUB_RETENTION_DAYS=90
|
||||||
GITHUB_RUN_ATTEMPT=1
|
GITHUB_RUN_ID=325972677
|
||||||
GITHUB_RUN_ID=2188688025
|
GITHUB_RUN_NUMBER=7
|
||||||
GITHUB_RUN_NUMBER=11
|
|
||||||
GITHUB_SERVER_URL=https://github.com
|
GITHUB_SERVER_URL=https://github.com
|
||||||
GITHUB_SHA=a9c8c5828b91be19d9728548b24759e352367ef1
|
GITHUB_SHA=1e9249f05bfc090e0688b8fb9c1b347586add504
|
||||||
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_ca953e95-2f41-4926-bc52-a1c8d90e94c1
|
GITHUB_WORKFLOW=event
|
||||||
GITHUB_WORKFLOW=metadata
|
|
||||||
GITHUB_WORKSPACE=/home/runner/work/test-docker-action/test-docker-action
|
GITHUB_WORKSPACE=/home/runner/work/test-docker-action/test-docker-action
|
||||||
|
@ -1,504 +0,0 @@
|
|||||||
{
|
|
||||||
"action": "opened",
|
|
||||||
"number": 15,
|
|
||||||
"organization": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/5429470?v=4",
|
|
||||||
"description": "Docker helps developers bring their ideas to life by conquering the complexity of app development.",
|
|
||||||
"events_url": "https://api.github.com/orgs/docker/events",
|
|
||||||
"hooks_url": "https://api.github.com/orgs/docker/hooks",
|
|
||||||
"id": 5429470,
|
|
||||||
"issues_url": "https://api.github.com/orgs/docker/issues",
|
|
||||||
"login": "docker",
|
|
||||||
"members_url": "https://api.github.com/orgs/docker/members{/member}",
|
|
||||||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjU0Mjk0NzA=",
|
|
||||||
"public_members_url": "https://api.github.com/orgs/docker/public_members{/member}",
|
|
||||||
"repos_url": "https://api.github.com/orgs/docker/repos",
|
|
||||||
"url": "https://api.github.com/orgs/docker"
|
|
||||||
},
|
|
||||||
"pull_request": {
|
|
||||||
"_links": {
|
|
||||||
"comments": {
|
|
||||||
"href": "https://api.github.com/repos/docker/test-docker-action/issues/15/comments"
|
|
||||||
},
|
|
||||||
"commits": {
|
|
||||||
"href": "https://api.github.com/repos/docker/test-docker-action/pulls/15/commits"
|
|
||||||
},
|
|
||||||
"html": {
|
|
||||||
"href": "https://github.com/docker/test-docker-action/pull/15"
|
|
||||||
},
|
|
||||||
"issue": {
|
|
||||||
"href": "https://api.github.com/repos/docker/test-docker-action/issues/15"
|
|
||||||
},
|
|
||||||
"review_comment": {
|
|
||||||
"href": "https://api.github.com/repos/docker/test-docker-action/pulls/comments{/number}"
|
|
||||||
},
|
|
||||||
"review_comments": {
|
|
||||||
"href": "https://api.github.com/repos/docker/test-docker-action/pulls/15/comments"
|
|
||||||
},
|
|
||||||
"self": {
|
|
||||||
"href": "https://api.github.com/repos/docker/test-docker-action/pulls/15"
|
|
||||||
},
|
|
||||||
"statuses": {
|
|
||||||
"href": "https://api.github.com/repos/docker/test-docker-action/statuses/3370e228f2209994d57af4427fe64e71bb79ac96"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"active_lock_reason": null,
|
|
||||||
"additions": 1,
|
|
||||||
"assignee": null,
|
|
||||||
"assignees": [],
|
|
||||||
"author_association": "COLLABORATOR",
|
|
||||||
"auto_merge": null,
|
|
||||||
"base": {
|
|
||||||
"label": "docker:master",
|
|
||||||
"ref": "master",
|
|
||||||
"repo": {
|
|
||||||
"allow_auto_merge": false,
|
|
||||||
"allow_forking": true,
|
|
||||||
"allow_merge_commit": true,
|
|
||||||
"allow_rebase_merge": true,
|
|
||||||
"allow_squash_merge": true,
|
|
||||||
"allow_update_branch": false,
|
|
||||||
"archive_url": "https://api.github.com/repos/docker/test-docker-action/{archive_format}{/ref}",
|
|
||||||
"archived": false,
|
|
||||||
"assignees_url": "https://api.github.com/repos/docker/test-docker-action/assignees{/user}",
|
|
||||||
"blobs_url": "https://api.github.com/repos/docker/test-docker-action/git/blobs{/sha}",
|
|
||||||
"branches_url": "https://api.github.com/repos/docker/test-docker-action/branches{/branch}",
|
|
||||||
"clone_url": "https://github.com/docker/test-docker-action.git",
|
|
||||||
"collaborators_url": "https://api.github.com/repos/docker/test-docker-action/collaborators{/collaborator}",
|
|
||||||
"comments_url": "https://api.github.com/repos/docker/test-docker-action/comments{/number}",
|
|
||||||
"commits_url": "https://api.github.com/repos/docker/test-docker-action/commits{/sha}",
|
|
||||||
"compare_url": "https://api.github.com/repos/docker/test-docker-action/compare/{base}...{head}",
|
|
||||||
"contents_url": "https://api.github.com/repos/docker/test-docker-action/contents/{+path}",
|
|
||||||
"contributors_url": "https://api.github.com/repos/docker/test-docker-action/contributors",
|
|
||||||
"created_at": "2020-08-07T09:23:00Z",
|
|
||||||
"default_branch": "master",
|
|
||||||
"delete_branch_on_merge": false,
|
|
||||||
"deployments_url": "https://api.github.com/repos/docker/test-docker-action/deployments",
|
|
||||||
"description": "Test \"Docker\" Actions",
|
|
||||||
"disabled": false,
|
|
||||||
"downloads_url": "https://api.github.com/repos/docker/test-docker-action/downloads",
|
|
||||||
"events_url": "https://api.github.com/repos/docker/test-docker-action/events",
|
|
||||||
"fork": false,
|
|
||||||
"forks": 1,
|
|
||||||
"forks_count": 1,
|
|
||||||
"forks_url": "https://api.github.com/repos/docker/test-docker-action/forks",
|
|
||||||
"full_name": "docker/test-docker-action",
|
|
||||||
"git_commits_url": "https://api.github.com/repos/docker/test-docker-action/git/commits{/sha}",
|
|
||||||
"git_refs_url": "https://api.github.com/repos/docker/test-docker-action/git/refs{/sha}",
|
|
||||||
"git_tags_url": "https://api.github.com/repos/docker/test-docker-action/git/tags{/sha}",
|
|
||||||
"git_url": "git://github.com/docker/test-docker-action.git",
|
|
||||||
"has_downloads": true,
|
|
||||||
"has_issues": true,
|
|
||||||
"has_pages": false,
|
|
||||||
"has_projects": true,
|
|
||||||
"has_wiki": true,
|
|
||||||
"homepage": "",
|
|
||||||
"hooks_url": "https://api.github.com/repos/docker/test-docker-action/hooks",
|
|
||||||
"html_url": "https://github.com/docker/test-docker-action",
|
|
||||||
"id": 285789493,
|
|
||||||
"is_template": false,
|
|
||||||
"issue_comment_url": "https://api.github.com/repos/docker/test-docker-action/issues/comments{/number}",
|
|
||||||
"issue_events_url": "https://api.github.com/repos/docker/test-docker-action/issues/events{/number}",
|
|
||||||
"issues_url": "https://api.github.com/repos/docker/test-docker-action/issues{/number}",
|
|
||||||
"keys_url": "https://api.github.com/repos/docker/test-docker-action/keys{/key_id}",
|
|
||||||
"labels_url": "https://api.github.com/repos/docker/test-docker-action/labels{/name}",
|
|
||||||
"language": "JavaScript",
|
|
||||||
"languages_url": "https://api.github.com/repos/docker/test-docker-action/languages",
|
|
||||||
"license": {
|
|
||||||
"key": "mit",
|
|
||||||
"name": "MIT License",
|
|
||||||
"node_id": "MDc6TGljZW5zZTEz",
|
|
||||||
"spdx_id": "MIT",
|
|
||||||
"url": "https://api.github.com/licenses/mit"
|
|
||||||
},
|
|
||||||
"merges_url": "https://api.github.com/repos/docker/test-docker-action/merges",
|
|
||||||
"milestones_url": "https://api.github.com/repos/docker/test-docker-action/milestones{/number}",
|
|
||||||
"mirror_url": null,
|
|
||||||
"name": "test-docker-action",
|
|
||||||
"node_id": "MDEwOlJlcG9zaXRvcnkyODU3ODk0OTM=",
|
|
||||||
"notifications_url": "https://api.github.com/repos/docker/test-docker-action/notifications{?since,all,participating}",
|
|
||||||
"open_issues": 6,
|
|
||||||
"open_issues_count": 6,
|
|
||||||
"owner": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/5429470?v=4",
|
|
||||||
"events_url": "https://api.github.com/users/docker/events{/privacy}",
|
|
||||||
"followers_url": "https://api.github.com/users/docker/followers",
|
|
||||||
"following_url": "https://api.github.com/users/docker/following{/other_user}",
|
|
||||||
"gists_url": "https://api.github.com/users/docker/gists{/gist_id}",
|
|
||||||
"gravatar_id": "",
|
|
||||||
"html_url": "https://github.com/docker",
|
|
||||||
"id": 5429470,
|
|
||||||
"login": "docker",
|
|
||||||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjU0Mjk0NzA=",
|
|
||||||
"organizations_url": "https://api.github.com/users/docker/orgs",
|
|
||||||
"received_events_url": "https://api.github.com/users/docker/received_events",
|
|
||||||
"repos_url": "https://api.github.com/users/docker/repos",
|
|
||||||
"site_admin": false,
|
|
||||||
"starred_url": "https://api.github.com/users/docker/starred{/owner}{/repo}",
|
|
||||||
"subscriptions_url": "https://api.github.com/users/docker/subscriptions",
|
|
||||||
"type": "Organization",
|
|
||||||
"url": "https://api.github.com/users/docker"
|
|
||||||
},
|
|
||||||
"private": true,
|
|
||||||
"pulls_url": "https://api.github.com/repos/docker/test-docker-action/pulls{/number}",
|
|
||||||
"pushed_at": "2022-04-19T09:04:50Z",
|
|
||||||
"releases_url": "https://api.github.com/repos/docker/test-docker-action/releases{/id}",
|
|
||||||
"size": 796,
|
|
||||||
"ssh_url": "git@github.com:docker/test-docker-action.git",
|
|
||||||
"stargazers_count": 0,
|
|
||||||
"stargazers_url": "https://api.github.com/repos/docker/test-docker-action/stargazers",
|
|
||||||
"statuses_url": "https://api.github.com/repos/docker/test-docker-action/statuses/{sha}",
|
|
||||||
"subscribers_url": "https://api.github.com/repos/docker/test-docker-action/subscribers",
|
|
||||||
"subscription_url": "https://api.github.com/repos/docker/test-docker-action/subscription",
|
|
||||||
"svn_url": "https://github.com/docker/test-docker-action",
|
|
||||||
"tags_url": "https://api.github.com/repos/docker/test-docker-action/tags",
|
|
||||||
"teams_url": "https://api.github.com/repos/docker/test-docker-action/teams",
|
|
||||||
"topics": [],
|
|
||||||
"trees_url": "https://api.github.com/repos/docker/test-docker-action/git/trees{/sha}",
|
|
||||||
"updated_at": "2022-04-19T09:05:09Z",
|
|
||||||
"url": "https://api.github.com/repos/docker/test-docker-action",
|
|
||||||
"visibility": "private",
|
|
||||||
"watchers": 0,
|
|
||||||
"watchers_count": 0
|
|
||||||
},
|
|
||||||
"sha": "266574110acf203503badf966df2ea24b5d732d7",
|
|
||||||
"user": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/5429470?v=4",
|
|
||||||
"events_url": "https://api.github.com/users/docker/events{/privacy}",
|
|
||||||
"followers_url": "https://api.github.com/users/docker/followers",
|
|
||||||
"following_url": "https://api.github.com/users/docker/following{/other_user}",
|
|
||||||
"gists_url": "https://api.github.com/users/docker/gists{/gist_id}",
|
|
||||||
"gravatar_id": "",
|
|
||||||
"html_url": "https://github.com/docker",
|
|
||||||
"id": 5429470,
|
|
||||||
"login": "docker",
|
|
||||||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjU0Mjk0NzA=",
|
|
||||||
"organizations_url": "https://api.github.com/users/docker/orgs",
|
|
||||||
"received_events_url": "https://api.github.com/users/docker/received_events",
|
|
||||||
"repos_url": "https://api.github.com/users/docker/repos",
|
|
||||||
"site_admin": false,
|
|
||||||
"starred_url": "https://api.github.com/users/docker/starred{/owner}{/repo}",
|
|
||||||
"subscriptions_url": "https://api.github.com/users/docker/subscriptions",
|
|
||||||
"type": "Organization",
|
|
||||||
"url": "https://api.github.com/users/docker"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": null,
|
|
||||||
"changed_files": 1,
|
|
||||||
"closed_at": null,
|
|
||||||
"comments": 0,
|
|
||||||
"comments_url": "https://api.github.com/repos/docker/test-docker-action/issues/15/comments",
|
|
||||||
"commits": 1,
|
|
||||||
"commits_url": "https://api.github.com/repos/docker/test-docker-action/pulls/15/commits",
|
|
||||||
"created_at": "2022-04-19T09:16:17Z",
|
|
||||||
"deletions": 1,
|
|
||||||
"diff_url": "https://github.com/docker/test-docker-action/pull/15.diff",
|
|
||||||
"draft": false,
|
|
||||||
"head": {
|
|
||||||
"label": "crazy-max:test-pr",
|
|
||||||
"ref": "test-pr",
|
|
||||||
"repo": {
|
|
||||||
"allow_auto_merge": false,
|
|
||||||
"allow_forking": true,
|
|
||||||
"allow_merge_commit": true,
|
|
||||||
"allow_rebase_merge": true,
|
|
||||||
"allow_squash_merge": true,
|
|
||||||
"allow_update_branch": false,
|
|
||||||
"archive_url": "https://api.github.com/repos/crazy-max/test-docker-action/{archive_format}{/ref}",
|
|
||||||
"archived": false,
|
|
||||||
"assignees_url": "https://api.github.com/repos/crazy-max/test-docker-action/assignees{/user}",
|
|
||||||
"blobs_url": "https://api.github.com/repos/crazy-max/test-docker-action/git/blobs{/sha}",
|
|
||||||
"branches_url": "https://api.github.com/repos/crazy-max/test-docker-action/branches{/branch}",
|
|
||||||
"clone_url": "https://github.com/crazy-max/test-docker-action.git",
|
|
||||||
"collaborators_url": "https://api.github.com/repos/crazy-max/test-docker-action/collaborators{/collaborator}",
|
|
||||||
"comments_url": "https://api.github.com/repos/crazy-max/test-docker-action/comments{/number}",
|
|
||||||
"commits_url": "https://api.github.com/repos/crazy-max/test-docker-action/commits{/sha}",
|
|
||||||
"compare_url": "https://api.github.com/repos/crazy-max/test-docker-action/compare/{base}...{head}",
|
|
||||||
"contents_url": "https://api.github.com/repos/crazy-max/test-docker-action/contents/{+path}",
|
|
||||||
"contributors_url": "https://api.github.com/repos/crazy-max/test-docker-action/contributors",
|
|
||||||
"created_at": "2021-07-11T17:34:22Z",
|
|
||||||
"default_branch": "master",
|
|
||||||
"delete_branch_on_merge": false,
|
|
||||||
"deployments_url": "https://api.github.com/repos/crazy-max/test-docker-action/deployments",
|
|
||||||
"description": "Test \"Docker\" Actions",
|
|
||||||
"disabled": false,
|
|
||||||
"downloads_url": "https://api.github.com/repos/crazy-max/test-docker-action/downloads",
|
|
||||||
"events_url": "https://api.github.com/repos/crazy-max/test-docker-action/events",
|
|
||||||
"fork": true,
|
|
||||||
"forks": 0,
|
|
||||||
"forks_count": 0,
|
|
||||||
"forks_url": "https://api.github.com/repos/crazy-max/test-docker-action/forks",
|
|
||||||
"full_name": "crazy-max/test-docker-action",
|
|
||||||
"git_commits_url": "https://api.github.com/repos/crazy-max/test-docker-action/git/commits{/sha}",
|
|
||||||
"git_refs_url": "https://api.github.com/repos/crazy-max/test-docker-action/git/refs{/sha}",
|
|
||||||
"git_tags_url": "https://api.github.com/repos/crazy-max/test-docker-action/git/tags{/sha}",
|
|
||||||
"git_url": "git://github.com/crazy-max/test-docker-action.git",
|
|
||||||
"has_downloads": true,
|
|
||||||
"has_issues": false,
|
|
||||||
"has_pages": false,
|
|
||||||
"has_projects": true,
|
|
||||||
"has_wiki": false,
|
|
||||||
"homepage": "",
|
|
||||||
"hooks_url": "https://api.github.com/repos/crazy-max/test-docker-action/hooks",
|
|
||||||
"html_url": "https://github.com/crazy-max/test-docker-action",
|
|
||||||
"id": 385013169,
|
|
||||||
"is_template": false,
|
|
||||||
"issue_comment_url": "https://api.github.com/repos/crazy-max/test-docker-action/issues/comments{/number}",
|
|
||||||
"issue_events_url": "https://api.github.com/repos/crazy-max/test-docker-action/issues/events{/number}",
|
|
||||||
"issues_url": "https://api.github.com/repos/crazy-max/test-docker-action/issues{/number}",
|
|
||||||
"keys_url": "https://api.github.com/repos/crazy-max/test-docker-action/keys{/key_id}",
|
|
||||||
"labels_url": "https://api.github.com/repos/crazy-max/test-docker-action/labels{/name}",
|
|
||||||
"language": "JavaScript",
|
|
||||||
"languages_url": "https://api.github.com/repos/crazy-max/test-docker-action/languages",
|
|
||||||
"license": {
|
|
||||||
"key": "mit",
|
|
||||||
"name": "MIT License",
|
|
||||||
"node_id": "MDc6TGljZW5zZTEz",
|
|
||||||
"spdx_id": "MIT",
|
|
||||||
"url": "https://api.github.com/licenses/mit"
|
|
||||||
},
|
|
||||||
"merges_url": "https://api.github.com/repos/crazy-max/test-docker-action/merges",
|
|
||||||
"milestones_url": "https://api.github.com/repos/crazy-max/test-docker-action/milestones{/number}",
|
|
||||||
"mirror_url": null,
|
|
||||||
"name": "test-docker-action",
|
|
||||||
"node_id": "MDEwOlJlcG9zaXRvcnkzODUwMTMxNjk=",
|
|
||||||
"notifications_url": "https://api.github.com/repos/crazy-max/test-docker-action/notifications{?since,all,participating}",
|
|
||||||
"open_issues": 0,
|
|
||||||
"open_issues_count": 0,
|
|
||||||
"owner": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/1951866?v=4",
|
|
||||||
"events_url": "https://api.github.com/users/crazy-max/events{/privacy}",
|
|
||||||
"followers_url": "https://api.github.com/users/crazy-max/followers",
|
|
||||||
"following_url": "https://api.github.com/users/crazy-max/following{/other_user}",
|
|
||||||
"gists_url": "https://api.github.com/users/crazy-max/gists{/gist_id}",
|
|
||||||
"gravatar_id": "",
|
|
||||||
"html_url": "https://github.com/crazy-max",
|
|
||||||
"id": 1951866,
|
|
||||||
"login": "crazy-max",
|
|
||||||
"node_id": "MDQ6VXNlcjE5NTE4NjY=",
|
|
||||||
"organizations_url": "https://api.github.com/users/crazy-max/orgs",
|
|
||||||
"received_events_url": "https://api.github.com/users/crazy-max/received_events",
|
|
||||||
"repos_url": "https://api.github.com/users/crazy-max/repos",
|
|
||||||
"site_admin": false,
|
|
||||||
"starred_url": "https://api.github.com/users/crazy-max/starred{/owner}{/repo}",
|
|
||||||
"subscriptions_url": "https://api.github.com/users/crazy-max/subscriptions",
|
|
||||||
"type": "User",
|
|
||||||
"url": "https://api.github.com/users/crazy-max"
|
|
||||||
},
|
|
||||||
"private": true,
|
|
||||||
"pulls_url": "https://api.github.com/repos/crazy-max/test-docker-action/pulls{/number}",
|
|
||||||
"pushed_at": "2022-04-19T09:16:07Z",
|
|
||||||
"releases_url": "https://api.github.com/repos/crazy-max/test-docker-action/releases{/id}",
|
|
||||||
"size": 151,
|
|
||||||
"ssh_url": "git@github.com:crazy-max/test-docker-action.git",
|
|
||||||
"stargazers_count": 0,
|
|
||||||
"stargazers_url": "https://api.github.com/repos/crazy-max/test-docker-action/stargazers",
|
|
||||||
"statuses_url": "https://api.github.com/repos/crazy-max/test-docker-action/statuses/{sha}",
|
|
||||||
"subscribers_url": "https://api.github.com/repos/crazy-max/test-docker-action/subscribers",
|
|
||||||
"subscription_url": "https://api.github.com/repos/crazy-max/test-docker-action/subscription",
|
|
||||||
"svn_url": "https://github.com/crazy-max/test-docker-action",
|
|
||||||
"tags_url": "https://api.github.com/repos/crazy-max/test-docker-action/tags",
|
|
||||||
"teams_url": "https://api.github.com/repos/crazy-max/test-docker-action/teams",
|
|
||||||
"topics": [],
|
|
||||||
"trees_url": "https://api.github.com/repos/crazy-max/test-docker-action/git/trees{/sha}",
|
|
||||||
"updated_at": "2022-04-19T09:13:10Z",
|
|
||||||
"url": "https://api.github.com/repos/crazy-max/test-docker-action",
|
|
||||||
"visibility": "private",
|
|
||||||
"watchers": 0,
|
|
||||||
"watchers_count": 0
|
|
||||||
},
|
|
||||||
"sha": "3370e228f2209994d57af4427fe64e71bb79ac96",
|
|
||||||
"user": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/1951866?v=4",
|
|
||||||
"events_url": "https://api.github.com/users/crazy-max/events{/privacy}",
|
|
||||||
"followers_url": "https://api.github.com/users/crazy-max/followers",
|
|
||||||
"following_url": "https://api.github.com/users/crazy-max/following{/other_user}",
|
|
||||||
"gists_url": "https://api.github.com/users/crazy-max/gists{/gist_id}",
|
|
||||||
"gravatar_id": "",
|
|
||||||
"html_url": "https://github.com/crazy-max",
|
|
||||||
"id": 1951866,
|
|
||||||
"login": "crazy-max",
|
|
||||||
"node_id": "MDQ6VXNlcjE5NTE4NjY=",
|
|
||||||
"organizations_url": "https://api.github.com/users/crazy-max/orgs",
|
|
||||||
"received_events_url": "https://api.github.com/users/crazy-max/received_events",
|
|
||||||
"repos_url": "https://api.github.com/users/crazy-max/repos",
|
|
||||||
"site_admin": false,
|
|
||||||
"starred_url": "https://api.github.com/users/crazy-max/starred{/owner}{/repo}",
|
|
||||||
"subscriptions_url": "https://api.github.com/users/crazy-max/subscriptions",
|
|
||||||
"type": "User",
|
|
||||||
"url": "https://api.github.com/users/crazy-max"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"html_url": "https://github.com/docker/test-docker-action/pull/15",
|
|
||||||
"id": 912840343,
|
|
||||||
"issue_url": "https://api.github.com/repos/docker/test-docker-action/issues/15",
|
|
||||||
"labels": [],
|
|
||||||
"locked": false,
|
|
||||||
"maintainer_can_modify": true,
|
|
||||||
"merge_commit_sha": null,
|
|
||||||
"mergeable": null,
|
|
||||||
"mergeable_state": "unknown",
|
|
||||||
"merged": false,
|
|
||||||
"merged_at": null,
|
|
||||||
"merged_by": null,
|
|
||||||
"milestone": null,
|
|
||||||
"node_id": "PR_kwDOEQjNNc42aNaX",
|
|
||||||
"number": 15,
|
|
||||||
"patch_url": "https://github.com/docker/test-docker-action/pull/15.patch",
|
|
||||||
"rebaseable": null,
|
|
||||||
"requested_reviewers": [],
|
|
||||||
"requested_teams": [],
|
|
||||||
"review_comment_url": "https://api.github.com/repos/docker/test-docker-action/pulls/comments{/number}",
|
|
||||||
"review_comments": 0,
|
|
||||||
"review_comments_url": "https://api.github.com/repos/docker/test-docker-action/pulls/15/comments",
|
|
||||||
"state": "open",
|
|
||||||
"statuses_url": "https://api.github.com/repos/docker/test-docker-action/statuses/3370e228f2209994d57af4427fe64e71bb79ac96",
|
|
||||||
"title": "small change",
|
|
||||||
"updated_at": "2022-04-19T09:16:17Z",
|
|
||||||
"url": "https://api.github.com/repos/docker/test-docker-action/pulls/15",
|
|
||||||
"user": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/1951866?v=4",
|
|
||||||
"events_url": "https://api.github.com/users/crazy-max/events{/privacy}",
|
|
||||||
"followers_url": "https://api.github.com/users/crazy-max/followers",
|
|
||||||
"following_url": "https://api.github.com/users/crazy-max/following{/other_user}",
|
|
||||||
"gists_url": "https://api.github.com/users/crazy-max/gists{/gist_id}",
|
|
||||||
"gravatar_id": "",
|
|
||||||
"html_url": "https://github.com/crazy-max",
|
|
||||||
"id": 1951866,
|
|
||||||
"login": "crazy-max",
|
|
||||||
"node_id": "MDQ6VXNlcjE5NTE4NjY=",
|
|
||||||
"organizations_url": "https://api.github.com/users/crazy-max/orgs",
|
|
||||||
"received_events_url": "https://api.github.com/users/crazy-max/received_events",
|
|
||||||
"repos_url": "https://api.github.com/users/crazy-max/repos",
|
|
||||||
"site_admin": false,
|
|
||||||
"starred_url": "https://api.github.com/users/crazy-max/starred{/owner}{/repo}",
|
|
||||||
"subscriptions_url": "https://api.github.com/users/crazy-max/subscriptions",
|
|
||||||
"type": "User",
|
|
||||||
"url": "https://api.github.com/users/crazy-max"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"repository": {
|
|
||||||
"allow_forking": true,
|
|
||||||
"archive_url": "https://api.github.com/repos/docker/test-docker-action/{archive_format}{/ref}",
|
|
||||||
"archived": false,
|
|
||||||
"assignees_url": "https://api.github.com/repos/docker/test-docker-action/assignees{/user}",
|
|
||||||
"blobs_url": "https://api.github.com/repos/docker/test-docker-action/git/blobs{/sha}",
|
|
||||||
"branches_url": "https://api.github.com/repos/docker/test-docker-action/branches{/branch}",
|
|
||||||
"clone_url": "https://github.com/docker/test-docker-action.git",
|
|
||||||
"collaborators_url": "https://api.github.com/repos/docker/test-docker-action/collaborators{/collaborator}",
|
|
||||||
"comments_url": "https://api.github.com/repos/docker/test-docker-action/comments{/number}",
|
|
||||||
"commits_url": "https://api.github.com/repos/docker/test-docker-action/commits{/sha}",
|
|
||||||
"compare_url": "https://api.github.com/repos/docker/test-docker-action/compare/{base}...{head}",
|
|
||||||
"contents_url": "https://api.github.com/repos/docker/test-docker-action/contents/{+path}",
|
|
||||||
"contributors_url": "https://api.github.com/repos/docker/test-docker-action/contributors",
|
|
||||||
"created_at": "2020-08-07T09:23:00Z",
|
|
||||||
"default_branch": "master",
|
|
||||||
"deployments_url": "https://api.github.com/repos/docker/test-docker-action/deployments",
|
|
||||||
"description": "Test \"Docker\" Actions",
|
|
||||||
"disabled": false,
|
|
||||||
"downloads_url": "https://api.github.com/repos/docker/test-docker-action/downloads",
|
|
||||||
"events_url": "https://api.github.com/repos/docker/test-docker-action/events",
|
|
||||||
"fork": false,
|
|
||||||
"forks": 1,
|
|
||||||
"forks_count": 1,
|
|
||||||
"forks_url": "https://api.github.com/repos/docker/test-docker-action/forks",
|
|
||||||
"full_name": "docker/test-docker-action",
|
|
||||||
"git_commits_url": "https://api.github.com/repos/docker/test-docker-action/git/commits{/sha}",
|
|
||||||
"git_refs_url": "https://api.github.com/repos/docker/test-docker-action/git/refs{/sha}",
|
|
||||||
"git_tags_url": "https://api.github.com/repos/docker/test-docker-action/git/tags{/sha}",
|
|
||||||
"git_url": "git://github.com/docker/test-docker-action.git",
|
|
||||||
"has_downloads": true,
|
|
||||||
"has_issues": true,
|
|
||||||
"has_pages": false,
|
|
||||||
"has_projects": true,
|
|
||||||
"has_wiki": true,
|
|
||||||
"homepage": "",
|
|
||||||
"hooks_url": "https://api.github.com/repos/docker/test-docker-action/hooks",
|
|
||||||
"html_url": "https://github.com/docker/test-docker-action",
|
|
||||||
"id": 285789493,
|
|
||||||
"is_template": false,
|
|
||||||
"issue_comment_url": "https://api.github.com/repos/docker/test-docker-action/issues/comments{/number}",
|
|
||||||
"issue_events_url": "https://api.github.com/repos/docker/test-docker-action/issues/events{/number}",
|
|
||||||
"issues_url": "https://api.github.com/repos/docker/test-docker-action/issues{/number}",
|
|
||||||
"keys_url": "https://api.github.com/repos/docker/test-docker-action/keys{/key_id}",
|
|
||||||
"labels_url": "https://api.github.com/repos/docker/test-docker-action/labels{/name}",
|
|
||||||
"language": "JavaScript",
|
|
||||||
"languages_url": "https://api.github.com/repos/docker/test-docker-action/languages",
|
|
||||||
"license": {
|
|
||||||
"key": "mit",
|
|
||||||
"name": "MIT License",
|
|
||||||
"node_id": "MDc6TGljZW5zZTEz",
|
|
||||||
"spdx_id": "MIT",
|
|
||||||
"url": "https://api.github.com/licenses/mit"
|
|
||||||
},
|
|
||||||
"merges_url": "https://api.github.com/repos/docker/test-docker-action/merges",
|
|
||||||
"milestones_url": "https://api.github.com/repos/docker/test-docker-action/milestones{/number}",
|
|
||||||
"mirror_url": null,
|
|
||||||
"name": "test-docker-action",
|
|
||||||
"node_id": "MDEwOlJlcG9zaXRvcnkyODU3ODk0OTM=",
|
|
||||||
"notifications_url": "https://api.github.com/repos/docker/test-docker-action/notifications{?since,all,participating}",
|
|
||||||
"open_issues": 6,
|
|
||||||
"open_issues_count": 6,
|
|
||||||
"owner": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/5429470?v=4",
|
|
||||||
"events_url": "https://api.github.com/users/docker/events{/privacy}",
|
|
||||||
"followers_url": "https://api.github.com/users/docker/followers",
|
|
||||||
"following_url": "https://api.github.com/users/docker/following{/other_user}",
|
|
||||||
"gists_url": "https://api.github.com/users/docker/gists{/gist_id}",
|
|
||||||
"gravatar_id": "",
|
|
||||||
"html_url": "https://github.com/docker",
|
|
||||||
"id": 5429470,
|
|
||||||
"login": "docker",
|
|
||||||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjU0Mjk0NzA=",
|
|
||||||
"organizations_url": "https://api.github.com/users/docker/orgs",
|
|
||||||
"received_events_url": "https://api.github.com/users/docker/received_events",
|
|
||||||
"repos_url": "https://api.github.com/users/docker/repos",
|
|
||||||
"site_admin": false,
|
|
||||||
"starred_url": "https://api.github.com/users/docker/starred{/owner}{/repo}",
|
|
||||||
"subscriptions_url": "https://api.github.com/users/docker/subscriptions",
|
|
||||||
"type": "Organization",
|
|
||||||
"url": "https://api.github.com/users/docker"
|
|
||||||
},
|
|
||||||
"private": true,
|
|
||||||
"pulls_url": "https://api.github.com/repos/docker/test-docker-action/pulls{/number}",
|
|
||||||
"pushed_at": "2022-04-19T09:04:50Z",
|
|
||||||
"releases_url": "https://api.github.com/repos/docker/test-docker-action/releases{/id}",
|
|
||||||
"size": 796,
|
|
||||||
"ssh_url": "git@github.com:docker/test-docker-action.git",
|
|
||||||
"stargazers_count": 0,
|
|
||||||
"stargazers_url": "https://api.github.com/repos/docker/test-docker-action/stargazers",
|
|
||||||
"statuses_url": "https://api.github.com/repos/docker/test-docker-action/statuses/{sha}",
|
|
||||||
"subscribers_url": "https://api.github.com/repos/docker/test-docker-action/subscribers",
|
|
||||||
"subscription_url": "https://api.github.com/repos/docker/test-docker-action/subscription",
|
|
||||||
"svn_url": "https://github.com/docker/test-docker-action",
|
|
||||||
"tags_url": "https://api.github.com/repos/docker/test-docker-action/tags",
|
|
||||||
"teams_url": "https://api.github.com/repos/docker/test-docker-action/teams",
|
|
||||||
"topics": [],
|
|
||||||
"trees_url": "https://api.github.com/repos/docker/test-docker-action/git/trees{/sha}",
|
|
||||||
"updated_at": "2022-04-19T09:05:09Z",
|
|
||||||
"url": "https://api.github.com/repos/docker/test-docker-action",
|
|
||||||
"visibility": "private",
|
|
||||||
"watchers": 0,
|
|
||||||
"watchers_count": 0
|
|
||||||
},
|
|
||||||
"sender": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/1951866?v=4",
|
|
||||||
"events_url": "https://api.github.com/users/crazy-max/events{/privacy}",
|
|
||||||
"followers_url": "https://api.github.com/users/crazy-max/followers",
|
|
||||||
"following_url": "https://api.github.com/users/crazy-max/following{/other_user}",
|
|
||||||
"gists_url": "https://api.github.com/users/crazy-max/gists{/gist_id}",
|
|
||||||
"gravatar_id": "",
|
|
||||||
"html_url": "https://github.com/crazy-max",
|
|
||||||
"id": 1951866,
|
|
||||||
"login": "crazy-max",
|
|
||||||
"node_id": "MDQ6VXNlcjE5NTE4NjY=",
|
|
||||||
"organizations_url": "https://api.github.com/users/crazy-max/orgs",
|
|
||||||
"received_events_url": "https://api.github.com/users/crazy-max/received_events",
|
|
||||||
"repos_url": "https://api.github.com/users/crazy-max/repos",
|
|
||||||
"site_admin": false,
|
|
||||||
"starred_url": "https://api.github.com/users/crazy-max/starred{/owner}{/repo}",
|
|
||||||
"subscriptions_url": "https://api.github.com/users/crazy-max/subscriptions",
|
|
||||||
"type": "User",
|
|
||||||
"url": "https://api.github.com/users/crazy-max"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,30 +0,0 @@
|
|||||||
GITHUB_ACTION=__crazy-max_ghaction-dump-context
|
|
||||||
GITHUB_ACTIONS=true
|
|
||||||
GITHUB_ACTION_PATH=/home/runner/work/_actions/crazy-max/ghaction-dump-context/v1
|
|
||||||
GITHUB_ACTION_REF=
|
|
||||||
GITHUB_ACTION_REPOSITORY=
|
|
||||||
GITHUB_ACTOR=crazy-max
|
|
||||||
GITHUB_API_URL=https://api.github.com
|
|
||||||
GITHUB_BASE_REF=master
|
|
||||||
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_2f69f48f-fb93-475f-a6a5-91dc7866f518
|
|
||||||
GITHUB_EVENT_NAME=pull_request_target
|
|
||||||
GITHUB_EVENT_PATH=./__tests__/fixtures/event_pull_request_target.json
|
|
||||||
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
|
|
||||||
GITHUB_HEAD_REF=test-pr
|
|
||||||
GITHUB_JOB=test
|
|
||||||
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_2f69f48f-fb93-475f-a6a5-91dc7866f518
|
|
||||||
GITHUB_REF=refs/heads/master
|
|
||||||
GITHUB_REF_NAME=master
|
|
||||||
GITHUB_REF_PROTECTED=false
|
|
||||||
GITHUB_REF_TYPE=branch
|
|
||||||
GITHUB_REPOSITORY=docker/test-docker-action
|
|
||||||
GITHUB_REPOSITORY_OWNER=docker
|
|
||||||
GITHUB_RETENTION_DAYS=90
|
|
||||||
GITHUB_RUN_ATTEMPT=1
|
|
||||||
GITHUB_RUN_ID=2188688000
|
|
||||||
GITHUB_RUN_NUMBER=10
|
|
||||||
GITHUB_SERVER_URL=https://github.com
|
|
||||||
GITHUB_SHA=266574110acf203503badf966df2ea24b5d732d7
|
|
||||||
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_2f69f48f-fb93-475f-a6a5-91dc7866f518
|
|
||||||
GITHUB_WORKFLOW=metadata
|
|
||||||
GITHUB_WORKSPACE=/home/runner/work/test-docker-action/test-docker-action
|
|
@ -1,504 +0,0 @@
|
|||||||
{
|
|
||||||
"action": "opened",
|
|
||||||
"number": 15,
|
|
||||||
"organization": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/5429470?v=4",
|
|
||||||
"description": "Docker helps developers bring their ideas to life by conquering the complexity of app development.",
|
|
||||||
"events_url": "https://api.github.com/orgs/docker/events",
|
|
||||||
"hooks_url": "https://api.github.com/orgs/docker/hooks",
|
|
||||||
"id": 5429470,
|
|
||||||
"issues_url": "https://api.github.com/orgs/docker/issues",
|
|
||||||
"login": "docker",
|
|
||||||
"members_url": "https://api.github.com/orgs/docker/members{/member}",
|
|
||||||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjU0Mjk0NzA=",
|
|
||||||
"public_members_url": "https://api.github.com/orgs/docker/public_members{/member}",
|
|
||||||
"repos_url": "https://api.github.com/orgs/docker/repos",
|
|
||||||
"url": "https://api.github.com/orgs/docker"
|
|
||||||
},
|
|
||||||
"pull_request": {
|
|
||||||
"_links": {
|
|
||||||
"comments": {
|
|
||||||
"href": "https://api.github.com/repos/docker/test-docker-action/issues/15/comments"
|
|
||||||
},
|
|
||||||
"commits": {
|
|
||||||
"href": "https://api.github.com/repos/docker/test-docker-action/pulls/15/commits"
|
|
||||||
},
|
|
||||||
"html": {
|
|
||||||
"href": "https://github.com/docker/test-docker-action/pull/15"
|
|
||||||
},
|
|
||||||
"issue": {
|
|
||||||
"href": "https://api.github.com/repos/docker/test-docker-action/issues/15"
|
|
||||||
},
|
|
||||||
"review_comment": {
|
|
||||||
"href": "https://api.github.com/repos/docker/test-docker-action/pulls/comments{/number}"
|
|
||||||
},
|
|
||||||
"review_comments": {
|
|
||||||
"href": "https://api.github.com/repos/docker/test-docker-action/pulls/15/comments"
|
|
||||||
},
|
|
||||||
"self": {
|
|
||||||
"href": "https://api.github.com/repos/docker/test-docker-action/pulls/15"
|
|
||||||
},
|
|
||||||
"statuses": {
|
|
||||||
"href": "https://api.github.com/repos/docker/test-docker-action/statuses/3370e228f2209994d57af4427fe64e71bb79ac96"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"active_lock_reason": null,
|
|
||||||
"additions": 1,
|
|
||||||
"assignee": null,
|
|
||||||
"assignees": [],
|
|
||||||
"author_association": "COLLABORATOR",
|
|
||||||
"auto_merge": null,
|
|
||||||
"base": {
|
|
||||||
"label": "docker:master",
|
|
||||||
"ref": "master",
|
|
||||||
"repo": {
|
|
||||||
"allow_auto_merge": false,
|
|
||||||
"allow_forking": true,
|
|
||||||
"allow_merge_commit": true,
|
|
||||||
"allow_rebase_merge": true,
|
|
||||||
"allow_squash_merge": true,
|
|
||||||
"allow_update_branch": false,
|
|
||||||
"archive_url": "https://api.github.com/repos/docker/test-docker-action/{archive_format}{/ref}",
|
|
||||||
"archived": false,
|
|
||||||
"assignees_url": "https://api.github.com/repos/docker/test-docker-action/assignees{/user}",
|
|
||||||
"blobs_url": "https://api.github.com/repos/docker/test-docker-action/git/blobs{/sha}",
|
|
||||||
"branches_url": "https://api.github.com/repos/docker/test-docker-action/branches{/branch}",
|
|
||||||
"clone_url": "https://github.com/docker/test-docker-action.git",
|
|
||||||
"collaborators_url": "https://api.github.com/repos/docker/test-docker-action/collaborators{/collaborator}",
|
|
||||||
"comments_url": "https://api.github.com/repos/docker/test-docker-action/comments{/number}",
|
|
||||||
"commits_url": "https://api.github.com/repos/docker/test-docker-action/commits{/sha}",
|
|
||||||
"compare_url": "https://api.github.com/repos/docker/test-docker-action/compare/{base}...{head}",
|
|
||||||
"contents_url": "https://api.github.com/repos/docker/test-docker-action/contents/{+path}",
|
|
||||||
"contributors_url": "https://api.github.com/repos/docker/test-docker-action/contributors",
|
|
||||||
"created_at": "2020-08-07T09:23:00Z",
|
|
||||||
"default_branch": "master",
|
|
||||||
"delete_branch_on_merge": false,
|
|
||||||
"deployments_url": "https://api.github.com/repos/docker/test-docker-action/deployments",
|
|
||||||
"description": "Test \"Docker\" Actions",
|
|
||||||
"disabled": false,
|
|
||||||
"downloads_url": "https://api.github.com/repos/docker/test-docker-action/downloads",
|
|
||||||
"events_url": "https://api.github.com/repos/docker/test-docker-action/events",
|
|
||||||
"fork": false,
|
|
||||||
"forks": 1,
|
|
||||||
"forks_count": 1,
|
|
||||||
"forks_url": "https://api.github.com/repos/docker/test-docker-action/forks",
|
|
||||||
"full_name": "docker/test-docker-action",
|
|
||||||
"git_commits_url": "https://api.github.com/repos/docker/test-docker-action/git/commits{/sha}",
|
|
||||||
"git_refs_url": "https://api.github.com/repos/docker/test-docker-action/git/refs{/sha}",
|
|
||||||
"git_tags_url": "https://api.github.com/repos/docker/test-docker-action/git/tags{/sha}",
|
|
||||||
"git_url": "git://github.com/docker/test-docker-action.git",
|
|
||||||
"has_downloads": true,
|
|
||||||
"has_issues": true,
|
|
||||||
"has_pages": false,
|
|
||||||
"has_projects": true,
|
|
||||||
"has_wiki": true,
|
|
||||||
"homepage": "",
|
|
||||||
"hooks_url": "https://api.github.com/repos/docker/test-docker-action/hooks",
|
|
||||||
"html_url": "https://github.com/docker/test-docker-action",
|
|
||||||
"id": 285789493,
|
|
||||||
"is_template": false,
|
|
||||||
"issue_comment_url": "https://api.github.com/repos/docker/test-docker-action/issues/comments{/number}",
|
|
||||||
"issue_events_url": "https://api.github.com/repos/docker/test-docker-action/issues/events{/number}",
|
|
||||||
"issues_url": "https://api.github.com/repos/docker/test-docker-action/issues{/number}",
|
|
||||||
"keys_url": "https://api.github.com/repos/docker/test-docker-action/keys{/key_id}",
|
|
||||||
"labels_url": "https://api.github.com/repos/docker/test-docker-action/labels{/name}",
|
|
||||||
"language": "JavaScript",
|
|
||||||
"languages_url": "https://api.github.com/repos/docker/test-docker-action/languages",
|
|
||||||
"license": {
|
|
||||||
"key": "mit",
|
|
||||||
"name": "MIT License",
|
|
||||||
"node_id": "MDc6TGljZW5zZTEz",
|
|
||||||
"spdx_id": "MIT",
|
|
||||||
"url": "https://api.github.com/licenses/mit"
|
|
||||||
},
|
|
||||||
"merges_url": "https://api.github.com/repos/docker/test-docker-action/merges",
|
|
||||||
"milestones_url": "https://api.github.com/repos/docker/test-docker-action/milestones{/number}",
|
|
||||||
"mirror_url": null,
|
|
||||||
"name": "test-docker-action",
|
|
||||||
"node_id": "MDEwOlJlcG9zaXRvcnkyODU3ODk0OTM=",
|
|
||||||
"notifications_url": "https://api.github.com/repos/docker/test-docker-action/notifications{?since,all,participating}",
|
|
||||||
"open_issues": 6,
|
|
||||||
"open_issues_count": 6,
|
|
||||||
"owner": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/5429470?v=4",
|
|
||||||
"events_url": "https://api.github.com/users/docker/events{/privacy}",
|
|
||||||
"followers_url": "https://api.github.com/users/docker/followers",
|
|
||||||
"following_url": "https://api.github.com/users/docker/following{/other_user}",
|
|
||||||
"gists_url": "https://api.github.com/users/docker/gists{/gist_id}",
|
|
||||||
"gravatar_id": "",
|
|
||||||
"html_url": "https://github.com/docker",
|
|
||||||
"id": 5429470,
|
|
||||||
"login": "docker",
|
|
||||||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjU0Mjk0NzA=",
|
|
||||||
"organizations_url": "https://api.github.com/users/docker/orgs",
|
|
||||||
"received_events_url": "https://api.github.com/users/docker/received_events",
|
|
||||||
"repos_url": "https://api.github.com/users/docker/repos",
|
|
||||||
"site_admin": false,
|
|
||||||
"starred_url": "https://api.github.com/users/docker/starred{/owner}{/repo}",
|
|
||||||
"subscriptions_url": "https://api.github.com/users/docker/subscriptions",
|
|
||||||
"type": "Organization",
|
|
||||||
"url": "https://api.github.com/users/docker"
|
|
||||||
},
|
|
||||||
"private": true,
|
|
||||||
"pulls_url": "https://api.github.com/repos/docker/test-docker-action/pulls{/number}",
|
|
||||||
"pushed_at": "2022-04-19T09:04:50Z",
|
|
||||||
"releases_url": "https://api.github.com/repos/docker/test-docker-action/releases{/id}",
|
|
||||||
"size": 796,
|
|
||||||
"ssh_url": "git@github.com:docker/test-docker-action.git",
|
|
||||||
"stargazers_count": 0,
|
|
||||||
"stargazers_url": "https://api.github.com/repos/docker/test-docker-action/stargazers",
|
|
||||||
"statuses_url": "https://api.github.com/repos/docker/test-docker-action/statuses/{sha}",
|
|
||||||
"subscribers_url": "https://api.github.com/repos/docker/test-docker-action/subscribers",
|
|
||||||
"subscription_url": "https://api.github.com/repos/docker/test-docker-action/subscription",
|
|
||||||
"svn_url": "https://github.com/docker/test-docker-action",
|
|
||||||
"tags_url": "https://api.github.com/repos/docker/test-docker-action/tags",
|
|
||||||
"teams_url": "https://api.github.com/repos/docker/test-docker-action/teams",
|
|
||||||
"topics": [],
|
|
||||||
"trees_url": "https://api.github.com/repos/docker/test-docker-action/git/trees{/sha}",
|
|
||||||
"updated_at": "2022-04-19T09:05:09Z",
|
|
||||||
"url": "https://api.github.com/repos/docker/test-docker-action",
|
|
||||||
"visibility": "private",
|
|
||||||
"watchers": 0,
|
|
||||||
"watchers_count": 0
|
|
||||||
},
|
|
||||||
"sha": "266574110acf203503badf966df2ea24b5d732d7",
|
|
||||||
"user": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/5429470?v=4",
|
|
||||||
"events_url": "https://api.github.com/users/docker/events{/privacy}",
|
|
||||||
"followers_url": "https://api.github.com/users/docker/followers",
|
|
||||||
"following_url": "https://api.github.com/users/docker/following{/other_user}",
|
|
||||||
"gists_url": "https://api.github.com/users/docker/gists{/gist_id}",
|
|
||||||
"gravatar_id": "",
|
|
||||||
"html_url": "https://github.com/docker",
|
|
||||||
"id": 5429470,
|
|
||||||
"login": "docker",
|
|
||||||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjU0Mjk0NzA=",
|
|
||||||
"organizations_url": "https://api.github.com/users/docker/orgs",
|
|
||||||
"received_events_url": "https://api.github.com/users/docker/received_events",
|
|
||||||
"repos_url": "https://api.github.com/users/docker/repos",
|
|
||||||
"site_admin": false,
|
|
||||||
"starred_url": "https://api.github.com/users/docker/starred{/owner}{/repo}",
|
|
||||||
"subscriptions_url": "https://api.github.com/users/docker/subscriptions",
|
|
||||||
"type": "Organization",
|
|
||||||
"url": "https://api.github.com/users/docker"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": null,
|
|
||||||
"changed_files": 1,
|
|
||||||
"closed_at": null,
|
|
||||||
"comments": 0,
|
|
||||||
"comments_url": "https://api.github.com/repos/docker/test-docker-action/issues/15/comments",
|
|
||||||
"commits": 1,
|
|
||||||
"commits_url": "https://api.github.com/repos/docker/test-docker-action/pulls/15/commits",
|
|
||||||
"created_at": "2022-04-19T09:16:17Z",
|
|
||||||
"deletions": 1,
|
|
||||||
"diff_url": "https://github.com/docker/test-docker-action/pull/15.diff",
|
|
||||||
"draft": false,
|
|
||||||
"head": {
|
|
||||||
"label": "crazy-max:test-pr",
|
|
||||||
"ref": "test-pr",
|
|
||||||
"repo": {
|
|
||||||
"allow_auto_merge": false,
|
|
||||||
"allow_forking": true,
|
|
||||||
"allow_merge_commit": true,
|
|
||||||
"allow_rebase_merge": true,
|
|
||||||
"allow_squash_merge": true,
|
|
||||||
"allow_update_branch": false,
|
|
||||||
"archive_url": "https://api.github.com/repos/crazy-max/test-docker-action/{archive_format}{/ref}",
|
|
||||||
"archived": false,
|
|
||||||
"assignees_url": "https://api.github.com/repos/crazy-max/test-docker-action/assignees{/user}",
|
|
||||||
"blobs_url": "https://api.github.com/repos/crazy-max/test-docker-action/git/blobs{/sha}",
|
|
||||||
"branches_url": "https://api.github.com/repos/crazy-max/test-docker-action/branches{/branch}",
|
|
||||||
"clone_url": "https://github.com/crazy-max/test-docker-action.git",
|
|
||||||
"collaborators_url": "https://api.github.com/repos/crazy-max/test-docker-action/collaborators{/collaborator}",
|
|
||||||
"comments_url": "https://api.github.com/repos/crazy-max/test-docker-action/comments{/number}",
|
|
||||||
"commits_url": "https://api.github.com/repos/crazy-max/test-docker-action/commits{/sha}",
|
|
||||||
"compare_url": "https://api.github.com/repos/crazy-max/test-docker-action/compare/{base}...{head}",
|
|
||||||
"contents_url": "https://api.github.com/repos/crazy-max/test-docker-action/contents/{+path}",
|
|
||||||
"contributors_url": "https://api.github.com/repos/crazy-max/test-docker-action/contributors",
|
|
||||||
"created_at": "2021-07-11T17:34:22Z",
|
|
||||||
"default_branch": "master",
|
|
||||||
"delete_branch_on_merge": false,
|
|
||||||
"deployments_url": "https://api.github.com/repos/crazy-max/test-docker-action/deployments",
|
|
||||||
"description": "Test \"Docker\" Actions",
|
|
||||||
"disabled": false,
|
|
||||||
"downloads_url": "https://api.github.com/repos/crazy-max/test-docker-action/downloads",
|
|
||||||
"events_url": "https://api.github.com/repos/crazy-max/test-docker-action/events",
|
|
||||||
"fork": true,
|
|
||||||
"forks": 0,
|
|
||||||
"forks_count": 0,
|
|
||||||
"forks_url": "https://api.github.com/repos/crazy-max/test-docker-action/forks",
|
|
||||||
"full_name": "crazy-max/test-docker-action",
|
|
||||||
"git_commits_url": "https://api.github.com/repos/crazy-max/test-docker-action/git/commits{/sha}",
|
|
||||||
"git_refs_url": "https://api.github.com/repos/crazy-max/test-docker-action/git/refs{/sha}",
|
|
||||||
"git_tags_url": "https://api.github.com/repos/crazy-max/test-docker-action/git/tags{/sha}",
|
|
||||||
"git_url": "git://github.com/crazy-max/test-docker-action.git",
|
|
||||||
"has_downloads": true,
|
|
||||||
"has_issues": false,
|
|
||||||
"has_pages": false,
|
|
||||||
"has_projects": true,
|
|
||||||
"has_wiki": false,
|
|
||||||
"homepage": "",
|
|
||||||
"hooks_url": "https://api.github.com/repos/crazy-max/test-docker-action/hooks",
|
|
||||||
"html_url": "https://github.com/crazy-max/test-docker-action",
|
|
||||||
"id": 385013169,
|
|
||||||
"is_template": false,
|
|
||||||
"issue_comment_url": "https://api.github.com/repos/crazy-max/test-docker-action/issues/comments{/number}",
|
|
||||||
"issue_events_url": "https://api.github.com/repos/crazy-max/test-docker-action/issues/events{/number}",
|
|
||||||
"issues_url": "https://api.github.com/repos/crazy-max/test-docker-action/issues{/number}",
|
|
||||||
"keys_url": "https://api.github.com/repos/crazy-max/test-docker-action/keys{/key_id}",
|
|
||||||
"labels_url": "https://api.github.com/repos/crazy-max/test-docker-action/labels{/name}",
|
|
||||||
"language": "JavaScript",
|
|
||||||
"languages_url": "https://api.github.com/repos/crazy-max/test-docker-action/languages",
|
|
||||||
"license": {
|
|
||||||
"key": "mit",
|
|
||||||
"name": "MIT License",
|
|
||||||
"node_id": "MDc6TGljZW5zZTEz",
|
|
||||||
"spdx_id": "MIT",
|
|
||||||
"url": "https://api.github.com/licenses/mit"
|
|
||||||
},
|
|
||||||
"merges_url": "https://api.github.com/repos/crazy-max/test-docker-action/merges",
|
|
||||||
"milestones_url": "https://api.github.com/repos/crazy-max/test-docker-action/milestones{/number}",
|
|
||||||
"mirror_url": null,
|
|
||||||
"name": "test-docker-action",
|
|
||||||
"node_id": "MDEwOlJlcG9zaXRvcnkzODUwMTMxNjk=",
|
|
||||||
"notifications_url": "https://api.github.com/repos/crazy-max/test-docker-action/notifications{?since,all,participating}",
|
|
||||||
"open_issues": 0,
|
|
||||||
"open_issues_count": 0,
|
|
||||||
"owner": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/1951866?v=4",
|
|
||||||
"events_url": "https://api.github.com/users/crazy-max/events{/privacy}",
|
|
||||||
"followers_url": "https://api.github.com/users/crazy-max/followers",
|
|
||||||
"following_url": "https://api.github.com/users/crazy-max/following{/other_user}",
|
|
||||||
"gists_url": "https://api.github.com/users/crazy-max/gists{/gist_id}",
|
|
||||||
"gravatar_id": "",
|
|
||||||
"html_url": "https://github.com/crazy-max",
|
|
||||||
"id": 1951866,
|
|
||||||
"login": "crazy-max",
|
|
||||||
"node_id": "MDQ6VXNlcjE5NTE4NjY=",
|
|
||||||
"organizations_url": "https://api.github.com/users/crazy-max/orgs",
|
|
||||||
"received_events_url": "https://api.github.com/users/crazy-max/received_events",
|
|
||||||
"repos_url": "https://api.github.com/users/crazy-max/repos",
|
|
||||||
"site_admin": false,
|
|
||||||
"starred_url": "https://api.github.com/users/crazy-max/starred{/owner}{/repo}",
|
|
||||||
"subscriptions_url": "https://api.github.com/users/crazy-max/subscriptions",
|
|
||||||
"type": "User",
|
|
||||||
"url": "https://api.github.com/users/crazy-max"
|
|
||||||
},
|
|
||||||
"private": true,
|
|
||||||
"pulls_url": "https://api.github.com/repos/crazy-max/test-docker-action/pulls{/number}",
|
|
||||||
"pushed_at": "2022-04-19T09:16:07Z",
|
|
||||||
"releases_url": "https://api.github.com/repos/crazy-max/test-docker-action/releases{/id}",
|
|
||||||
"size": 151,
|
|
||||||
"ssh_url": "git@github.com:crazy-max/test-docker-action.git",
|
|
||||||
"stargazers_count": 0,
|
|
||||||
"stargazers_url": "https://api.github.com/repos/crazy-max/test-docker-action/stargazers",
|
|
||||||
"statuses_url": "https://api.github.com/repos/crazy-max/test-docker-action/statuses/{sha}",
|
|
||||||
"subscribers_url": "https://api.github.com/repos/crazy-max/test-docker-action/subscribers",
|
|
||||||
"subscription_url": "https://api.github.com/repos/crazy-max/test-docker-action/subscription",
|
|
||||||
"svn_url": "https://github.com/crazy-max/test-docker-action",
|
|
||||||
"tags_url": "https://api.github.com/repos/crazy-max/test-docker-action/tags",
|
|
||||||
"teams_url": "https://api.github.com/repos/crazy-max/test-docker-action/teams",
|
|
||||||
"topics": [],
|
|
||||||
"trees_url": "https://api.github.com/repos/crazy-max/test-docker-action/git/trees{/sha}",
|
|
||||||
"updated_at": "2022-04-19T09:13:10Z",
|
|
||||||
"url": "https://api.github.com/repos/crazy-max/test-docker-action",
|
|
||||||
"visibility": "private",
|
|
||||||
"watchers": 0,
|
|
||||||
"watchers_count": 0
|
|
||||||
},
|
|
||||||
"sha": "3370e228f2209994d57af4427fe64e71bb79ac96",
|
|
||||||
"user": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/1951866?v=4",
|
|
||||||
"events_url": "https://api.github.com/users/crazy-max/events{/privacy}",
|
|
||||||
"followers_url": "https://api.github.com/users/crazy-max/followers",
|
|
||||||
"following_url": "https://api.github.com/users/crazy-max/following{/other_user}",
|
|
||||||
"gists_url": "https://api.github.com/users/crazy-max/gists{/gist_id}",
|
|
||||||
"gravatar_id": "",
|
|
||||||
"html_url": "https://github.com/crazy-max",
|
|
||||||
"id": 1951866,
|
|
||||||
"login": "crazy-max",
|
|
||||||
"node_id": "MDQ6VXNlcjE5NTE4NjY=",
|
|
||||||
"organizations_url": "https://api.github.com/users/crazy-max/orgs",
|
|
||||||
"received_events_url": "https://api.github.com/users/crazy-max/received_events",
|
|
||||||
"repos_url": "https://api.github.com/users/crazy-max/repos",
|
|
||||||
"site_admin": false,
|
|
||||||
"starred_url": "https://api.github.com/users/crazy-max/starred{/owner}{/repo}",
|
|
||||||
"subscriptions_url": "https://api.github.com/users/crazy-max/subscriptions",
|
|
||||||
"type": "User",
|
|
||||||
"url": "https://api.github.com/users/crazy-max"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"html_url": "https://github.com/docker/test-docker-action/pull/15",
|
|
||||||
"id": 912840343,
|
|
||||||
"issue_url": "https://api.github.com/repos/docker/test-docker-action/issues/15",
|
|
||||||
"labels": [],
|
|
||||||
"locked": false,
|
|
||||||
"maintainer_can_modify": true,
|
|
||||||
"merge_commit_sha": null,
|
|
||||||
"mergeable": null,
|
|
||||||
"mergeable_state": "unknown",
|
|
||||||
"merged": false,
|
|
||||||
"merged_at": null,
|
|
||||||
"merged_by": null,
|
|
||||||
"milestone": null,
|
|
||||||
"node_id": "PR_kwDOEQjNNc42aNaX",
|
|
||||||
"number": 15,
|
|
||||||
"patch_url": "https://github.com/docker/test-docker-action/pull/15.patch",
|
|
||||||
"rebaseable": null,
|
|
||||||
"requested_reviewers": [],
|
|
||||||
"requested_teams": [],
|
|
||||||
"review_comment_url": "https://api.github.com/repos/docker/test-docker-action/pulls/comments{/number}",
|
|
||||||
"review_comments": 0,
|
|
||||||
"review_comments_url": "https://api.github.com/repos/docker/test-docker-action/pulls/15/comments",
|
|
||||||
"state": "open",
|
|
||||||
"statuses_url": "https://api.github.com/repos/docker/test-docker-action/statuses/3370e228f2209994d57af4427fe64e71bb79ac96",
|
|
||||||
"title": "small change",
|
|
||||||
"updated_at": "2022-04-19T09:16:17Z",
|
|
||||||
"url": "https://api.github.com/repos/docker/test-docker-action/pulls/15",
|
|
||||||
"user": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/1951866?v=4",
|
|
||||||
"events_url": "https://api.github.com/users/crazy-max/events{/privacy}",
|
|
||||||
"followers_url": "https://api.github.com/users/crazy-max/followers",
|
|
||||||
"following_url": "https://api.github.com/users/crazy-max/following{/other_user}",
|
|
||||||
"gists_url": "https://api.github.com/users/crazy-max/gists{/gist_id}",
|
|
||||||
"gravatar_id": "",
|
|
||||||
"html_url": "https://github.com/crazy-max",
|
|
||||||
"id": 1951866,
|
|
||||||
"login": "crazy-max",
|
|
||||||
"node_id": "MDQ6VXNlcjE5NTE4NjY=",
|
|
||||||
"organizations_url": "https://api.github.com/users/crazy-max/orgs",
|
|
||||||
"received_events_url": "https://api.github.com/users/crazy-max/received_events",
|
|
||||||
"repos_url": "https://api.github.com/users/crazy-max/repos",
|
|
||||||
"site_admin": false,
|
|
||||||
"starred_url": "https://api.github.com/users/crazy-max/starred{/owner}{/repo}",
|
|
||||||
"subscriptions_url": "https://api.github.com/users/crazy-max/subscriptions",
|
|
||||||
"type": "User",
|
|
||||||
"url": "https://api.github.com/users/crazy-max"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"repository": {
|
|
||||||
"allow_forking": true,
|
|
||||||
"archive_url": "https://api.github.com/repos/docker/test-docker-action/{archive_format}{/ref}",
|
|
||||||
"archived": false,
|
|
||||||
"assignees_url": "https://api.github.com/repos/docker/test-docker-action/assignees{/user}",
|
|
||||||
"blobs_url": "https://api.github.com/repos/docker/test-docker-action/git/blobs{/sha}",
|
|
||||||
"branches_url": "https://api.github.com/repos/docker/test-docker-action/branches{/branch}",
|
|
||||||
"clone_url": "https://github.com/docker/test-docker-action.git",
|
|
||||||
"collaborators_url": "https://api.github.com/repos/docker/test-docker-action/collaborators{/collaborator}",
|
|
||||||
"comments_url": "https://api.github.com/repos/docker/test-docker-action/comments{/number}",
|
|
||||||
"commits_url": "https://api.github.com/repos/docker/test-docker-action/commits{/sha}",
|
|
||||||
"compare_url": "https://api.github.com/repos/docker/test-docker-action/compare/{base}...{head}",
|
|
||||||
"contents_url": "https://api.github.com/repos/docker/test-docker-action/contents/{+path}",
|
|
||||||
"contributors_url": "https://api.github.com/repos/docker/test-docker-action/contributors",
|
|
||||||
"created_at": "2020-08-07T09:23:00Z",
|
|
||||||
"default_branch": "master",
|
|
||||||
"deployments_url": "https://api.github.com/repos/docker/test-docker-action/deployments",
|
|
||||||
"description": "Test \"Docker\" Actions",
|
|
||||||
"disabled": false,
|
|
||||||
"downloads_url": "https://api.github.com/repos/docker/test-docker-action/downloads",
|
|
||||||
"events_url": "https://api.github.com/repos/docker/test-docker-action/events",
|
|
||||||
"fork": false,
|
|
||||||
"forks": 1,
|
|
||||||
"forks_count": 1,
|
|
||||||
"forks_url": "https://api.github.com/repos/docker/test-docker-action/forks",
|
|
||||||
"full_name": "docker/test-docker-action",
|
|
||||||
"git_commits_url": "https://api.github.com/repos/docker/test-docker-action/git/commits{/sha}",
|
|
||||||
"git_refs_url": "https://api.github.com/repos/docker/test-docker-action/git/refs{/sha}",
|
|
||||||
"git_tags_url": "https://api.github.com/repos/docker/test-docker-action/git/tags{/sha}",
|
|
||||||
"git_url": "git://github.com/docker/test-docker-action.git",
|
|
||||||
"has_downloads": true,
|
|
||||||
"has_issues": true,
|
|
||||||
"has_pages": false,
|
|
||||||
"has_projects": true,
|
|
||||||
"has_wiki": true,
|
|
||||||
"homepage": "",
|
|
||||||
"hooks_url": "https://api.github.com/repos/docker/test-docker-action/hooks",
|
|
||||||
"html_url": "https://github.com/docker/test-docker-action",
|
|
||||||
"id": 285789493,
|
|
||||||
"is_template": false,
|
|
||||||
"issue_comment_url": "https://api.github.com/repos/docker/test-docker-action/issues/comments{/number}",
|
|
||||||
"issue_events_url": "https://api.github.com/repos/docker/test-docker-action/issues/events{/number}",
|
|
||||||
"issues_url": "https://api.github.com/repos/docker/test-docker-action/issues{/number}",
|
|
||||||
"keys_url": "https://api.github.com/repos/docker/test-docker-action/keys{/key_id}",
|
|
||||||
"labels_url": "https://api.github.com/repos/docker/test-docker-action/labels{/name}",
|
|
||||||
"language": "JavaScript",
|
|
||||||
"languages_url": "https://api.github.com/repos/docker/test-docker-action/languages",
|
|
||||||
"license": {
|
|
||||||
"key": "mit",
|
|
||||||
"name": "MIT License",
|
|
||||||
"node_id": "MDc6TGljZW5zZTEz",
|
|
||||||
"spdx_id": "MIT",
|
|
||||||
"url": "https://api.github.com/licenses/mit"
|
|
||||||
},
|
|
||||||
"merges_url": "https://api.github.com/repos/docker/test-docker-action/merges",
|
|
||||||
"milestones_url": "https://api.github.com/repos/docker/test-docker-action/milestones{/number}",
|
|
||||||
"mirror_url": null,
|
|
||||||
"name": "test-docker-action",
|
|
||||||
"node_id": "MDEwOlJlcG9zaXRvcnkyODU3ODk0OTM=",
|
|
||||||
"notifications_url": "https://api.github.com/repos/docker/test-docker-action/notifications{?since,all,participating}",
|
|
||||||
"open_issues": 6,
|
|
||||||
"open_issues_count": 6,
|
|
||||||
"owner": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/5429470?v=4",
|
|
||||||
"events_url": "https://api.github.com/users/docker/events{/privacy}",
|
|
||||||
"followers_url": "https://api.github.com/users/docker/followers",
|
|
||||||
"following_url": "https://api.github.com/users/docker/following{/other_user}",
|
|
||||||
"gists_url": "https://api.github.com/users/docker/gists{/gist_id}",
|
|
||||||
"gravatar_id": "",
|
|
||||||
"html_url": "https://github.com/docker",
|
|
||||||
"id": 5429470,
|
|
||||||
"login": "docker",
|
|
||||||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjU0Mjk0NzA=",
|
|
||||||
"organizations_url": "https://api.github.com/users/docker/orgs",
|
|
||||||
"received_events_url": "https://api.github.com/users/docker/received_events",
|
|
||||||
"repos_url": "https://api.github.com/users/docker/repos",
|
|
||||||
"site_admin": false,
|
|
||||||
"starred_url": "https://api.github.com/users/docker/starred{/owner}{/repo}",
|
|
||||||
"subscriptions_url": "https://api.github.com/users/docker/subscriptions",
|
|
||||||
"type": "Organization",
|
|
||||||
"url": "https://api.github.com/users/docker"
|
|
||||||
},
|
|
||||||
"private": true,
|
|
||||||
"pulls_url": "https://api.github.com/repos/docker/test-docker-action/pulls{/number}",
|
|
||||||
"pushed_at": "2022-04-19T09:04:50Z",
|
|
||||||
"releases_url": "https://api.github.com/repos/docker/test-docker-action/releases{/id}",
|
|
||||||
"size": 796,
|
|
||||||
"ssh_url": "git@github.com:docker/test-docker-action.git",
|
|
||||||
"stargazers_count": 0,
|
|
||||||
"stargazers_url": "https://api.github.com/repos/docker/test-docker-action/stargazers",
|
|
||||||
"statuses_url": "https://api.github.com/repos/docker/test-docker-action/statuses/{sha}",
|
|
||||||
"subscribers_url": "https://api.github.com/repos/docker/test-docker-action/subscribers",
|
|
||||||
"subscription_url": "https://api.github.com/repos/docker/test-docker-action/subscription",
|
|
||||||
"svn_url": "https://github.com/docker/test-docker-action",
|
|
||||||
"tags_url": "https://api.github.com/repos/docker/test-docker-action/tags",
|
|
||||||
"teams_url": "https://api.github.com/repos/docker/test-docker-action/teams",
|
|
||||||
"topics": [],
|
|
||||||
"trees_url": "https://api.github.com/repos/docker/test-docker-action/git/trees{/sha}",
|
|
||||||
"updated_at": "2022-04-19T09:05:09Z",
|
|
||||||
"url": "https://api.github.com/repos/docker/test-docker-action",
|
|
||||||
"visibility": "private",
|
|
||||||
"watchers": 0,
|
|
||||||
"watchers_count": 0
|
|
||||||
},
|
|
||||||
"sender": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/1951866?v=4",
|
|
||||||
"events_url": "https://api.github.com/users/crazy-max/events{/privacy}",
|
|
||||||
"followers_url": "https://api.github.com/users/crazy-max/followers",
|
|
||||||
"following_url": "https://api.github.com/users/crazy-max/following{/other_user}",
|
|
||||||
"gists_url": "https://api.github.com/users/crazy-max/gists{/gist_id}",
|
|
||||||
"gravatar_id": "",
|
|
||||||
"html_url": "https://github.com/crazy-max",
|
|
||||||
"id": 1951866,
|
|
||||||
"login": "crazy-max",
|
|
||||||
"node_id": "MDQ6VXNlcjE5NTE4NjY=",
|
|
||||||
"organizations_url": "https://api.github.com/users/crazy-max/orgs",
|
|
||||||
"received_events_url": "https://api.github.com/users/crazy-max/received_events",
|
|
||||||
"repos_url": "https://api.github.com/users/crazy-max/repos",
|
|
||||||
"site_admin": false,
|
|
||||||
"starred_url": "https://api.github.com/users/crazy-max/starred{/owner}{/repo}",
|
|
||||||
"subscriptions_url": "https://api.github.com/users/crazy-max/subscriptions",
|
|
||||||
"type": "User",
|
|
||||||
"url": "https://api.github.com/users/crazy-max"
|
|
||||||
}
|
|
||||||
}
|
|
23
__tests__/fixtures/event_push.env
Normal file
23
__tests__/fixtures/event_push.env
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
GITHUB_ACTION=crazy-maxghaction-dump-context
|
||||||
|
GITHUB_ACTIONS=true
|
||||||
|
GITHUB_ACTION_PATH=/home/runner/work/_actions/crazy-max/ghaction-dump-context/v1
|
||||||
|
GITHUB_ACTOR=crazy-max
|
||||||
|
GITHUB_API_URL=https://api.github.com
|
||||||
|
GITHUB_BASE_REF=
|
||||||
|
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_89a016e8-e5b7-4039-a67e-c8da08f87a0c
|
||||||
|
GITHUB_EVENT_NAME=push
|
||||||
|
#GITHUB_EVENT_PATH=/home/runner/work/_temp/_github_workflow/event.json
|
||||||
|
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
|
||||||
|
GITHUB_HEAD_REF=
|
||||||
|
GITHUB_JOB=event
|
||||||
|
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_89a016e8-e5b7-4039-a67e-c8da08f87a0c
|
||||||
|
GITHUB_REF=refs/heads/dev
|
||||||
|
GITHUB_REPOSITORY=crazy-max/test-docker-action
|
||||||
|
GITHUB_REPOSITORY_OWNER=crazy-max
|
||||||
|
GITHUB_RETENTION_DAYS=90
|
||||||
|
GITHUB_RUN_ID=325957516
|
||||||
|
GITHUB_RUN_NUMBER=1
|
||||||
|
GITHUB_SERVER_URL=https://github.com
|
||||||
|
GITHUB_SHA=90dd6032fac8bda1b6c4436a2e65de27961ed071
|
||||||
|
GITHUB_WORKFLOW=event
|
||||||
|
GITHUB_WORKSPACE=/home/runner/work/test-docker-action/test-docker-action
|
23
__tests__/fixtures/event_push_defbranch.env
Normal file
23
__tests__/fixtures/event_push_defbranch.env
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
GITHUB_ACTION=crazy-maxghaction-dump-context
|
||||||
|
GITHUB_ACTIONS=true
|
||||||
|
GITHUB_ACTION_PATH=/home/runner/work/_actions/crazy-max/ghaction-dump-context/v1
|
||||||
|
GITHUB_ACTOR=crazy-max
|
||||||
|
GITHUB_API_URL=https://api.github.com
|
||||||
|
GITHUB_BASE_REF=
|
||||||
|
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_89a016e8-e5b7-4039-a67e-c8da08f87a0c
|
||||||
|
GITHUB_EVENT_NAME=push
|
||||||
|
#GITHUB_EVENT_PATH=/home/runner/work/_temp/_github_workflow/event.json
|
||||||
|
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
|
||||||
|
GITHUB_HEAD_REF=
|
||||||
|
GITHUB_JOB=event
|
||||||
|
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_89a016e8-e5b7-4039-a67e-c8da08f87a0c
|
||||||
|
GITHUB_REF=refs/heads/master
|
||||||
|
GITHUB_REPOSITORY=crazy-max/test-docker-action
|
||||||
|
GITHUB_REPOSITORY_OWNER=crazy-max
|
||||||
|
GITHUB_RETENTION_DAYS=90
|
||||||
|
GITHUB_RUN_ID=325957516
|
||||||
|
GITHUB_RUN_NUMBER=1
|
||||||
|
GITHUB_SERVER_URL=https://github.com
|
||||||
|
GITHUB_SHA=90dd6032fac8bda1b6c4436a2e65de27961ed071
|
||||||
|
GITHUB_WORKFLOW=event
|
||||||
|
GITHUB_WORKSPACE=/home/runner/work/test-docker-action/test-docker-action
|
@ -1,30 +0,0 @@
|
|||||||
GITHUB_ACTION=__crazy-max_ghaction-dump-context
|
|
||||||
GITHUB_ACTIONS=true
|
|
||||||
GITHUB_ACTION_PATH=/home/runner/work/_actions/crazy-max/ghaction-dump-context/v1
|
|
||||||
GITHUB_ACTION_REF=
|
|
||||||
GITHUB_ACTION_REPOSITORY=
|
|
||||||
GITHUB_ACTOR=crazy-max
|
|
||||||
GITHUB_API_URL=https://api.github.com
|
|
||||||
GITHUB_BASE_REF=
|
|
||||||
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_dce158a5-37b3-4081-8414-32238d5cfa7b
|
|
||||||
GITHUB_EVENT_NAME=push
|
|
||||||
GITHUB_EVENT_PATH=./__tests__/fixtures/event_push_dev.json
|
|
||||||
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
|
|
||||||
GITHUB_HEAD_REF=
|
|
||||||
GITHUB_JOB=test
|
|
||||||
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_dce158a5-37b3-4081-8414-32238d5cfa7b
|
|
||||||
GITHUB_REF=refs/heads/dev
|
|
||||||
GITHUB_REF_NAME=dev
|
|
||||||
GITHUB_REF_PROTECTED=false
|
|
||||||
GITHUB_REF_TYPE=branch
|
|
||||||
GITHUB_REPOSITORY=docker/test-docker-action
|
|
||||||
GITHUB_REPOSITORY_OWNER=docker
|
|
||||||
GITHUB_RETENTION_DAYS=90
|
|
||||||
GITHUB_RUN_ATTEMPT=1
|
|
||||||
GITHUB_RUN_ID=2188748038
|
|
||||||
GITHUB_RUN_NUMBER=15
|
|
||||||
GITHUB_SERVER_URL=https://github.com
|
|
||||||
GITHUB_SHA=860c1904a1ce19322e91ac35af1ab07466440c37
|
|
||||||
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_dce158a5-37b3-4081-8414-32238d5cfa7b
|
|
||||||
GITHUB_WORKFLOW=metadata
|
|
||||||
GITHUB_WORKSPACE=/home/runner/work/test-docker-action/test-docker-action
|
|
@ -1,195 +0,0 @@
|
|||||||
{
|
|
||||||
"after": "860c1904a1ce19322e91ac35af1ab07466440c37",
|
|
||||||
"base_ref": null,
|
|
||||||
"before": "5f3331d7f7044c18ca9f12c77d961c4d7cf3276a",
|
|
||||||
"commits": [
|
|
||||||
{
|
|
||||||
"author": {
|
|
||||||
"email": "crazy-max@users.noreply.github.com",
|
|
||||||
"name": "CrazyMax",
|
|
||||||
"username": "crazy-max"
|
|
||||||
},
|
|
||||||
"committer": {
|
|
||||||
"email": "crazy-max@users.noreply.github.com",
|
|
||||||
"name": "CrazyMax",
|
|
||||||
"username": "crazy-max"
|
|
||||||
},
|
|
||||||
"distinct": true,
|
|
||||||
"id": "860c1904a1ce19322e91ac35af1ab07466440c37",
|
|
||||||
"message": "hello dev",
|
|
||||||
"timestamp": "2022-04-19T11:27:24+02:00",
|
|
||||||
"tree_id": "d2c60af597e863787d2d27f569e30495b0b92820",
|
|
||||||
"url": "https://github.com/docker/test-docker-action/commit/860c1904a1ce19322e91ac35af1ab07466440c37"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"compare": "https://github.com/docker/test-docker-action/compare/5f3331d7f704...860c1904a1ce",
|
|
||||||
"created": false,
|
|
||||||
"deleted": false,
|
|
||||||
"forced": false,
|
|
||||||
"head_commit": {
|
|
||||||
"author": {
|
|
||||||
"email": "crazy-max@users.noreply.github.com",
|
|
||||||
"name": "CrazyMax",
|
|
||||||
"username": "crazy-max"
|
|
||||||
},
|
|
||||||
"committer": {
|
|
||||||
"email": "crazy-max@users.noreply.github.com",
|
|
||||||
"name": "CrazyMax",
|
|
||||||
"username": "crazy-max"
|
|
||||||
},
|
|
||||||
"distinct": true,
|
|
||||||
"id": "860c1904a1ce19322e91ac35af1ab07466440c37",
|
|
||||||
"message": "hello dev",
|
|
||||||
"timestamp": "2022-04-19T11:27:24+02:00",
|
|
||||||
"tree_id": "d2c60af597e863787d2d27f569e30495b0b92820",
|
|
||||||
"url": "https://github.com/docker/test-docker-action/commit/860c1904a1ce19322e91ac35af1ab07466440c37"
|
|
||||||
},
|
|
||||||
"organization": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/5429470?v=4",
|
|
||||||
"description": "Docker helps developers bring their ideas to life by conquering the complexity of app development.",
|
|
||||||
"events_url": "https://api.github.com/orgs/docker/events",
|
|
||||||
"hooks_url": "https://api.github.com/orgs/docker/hooks",
|
|
||||||
"id": 5429470,
|
|
||||||
"issues_url": "https://api.github.com/orgs/docker/issues",
|
|
||||||
"login": "docker",
|
|
||||||
"members_url": "https://api.github.com/orgs/docker/members{/member}",
|
|
||||||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjU0Mjk0NzA=",
|
|
||||||
"public_members_url": "https://api.github.com/orgs/docker/public_members{/member}",
|
|
||||||
"repos_url": "https://api.github.com/orgs/docker/repos",
|
|
||||||
"url": "https://api.github.com/orgs/docker"
|
|
||||||
},
|
|
||||||
"pusher": {
|
|
||||||
"email": "github@crazymax.dev",
|
|
||||||
"name": "crazy-max"
|
|
||||||
},
|
|
||||||
"ref": "refs/heads/dev",
|
|
||||||
"repository": {
|
|
||||||
"allow_forking": true,
|
|
||||||
"archive_url": "https://api.github.com/repos/docker/test-docker-action/{archive_format}{/ref}",
|
|
||||||
"archived": false,
|
|
||||||
"assignees_url": "https://api.github.com/repos/docker/test-docker-action/assignees{/user}",
|
|
||||||
"blobs_url": "https://api.github.com/repos/docker/test-docker-action/git/blobs{/sha}",
|
|
||||||
"branches_url": "https://api.github.com/repos/docker/test-docker-action/branches{/branch}",
|
|
||||||
"clone_url": "https://github.com/docker/test-docker-action.git",
|
|
||||||
"collaborators_url": "https://api.github.com/repos/docker/test-docker-action/collaborators{/collaborator}",
|
|
||||||
"comments_url": "https://api.github.com/repos/docker/test-docker-action/comments{/number}",
|
|
||||||
"commits_url": "https://api.github.com/repos/docker/test-docker-action/commits{/sha}",
|
|
||||||
"compare_url": "https://api.github.com/repos/docker/test-docker-action/compare/{base}...{head}",
|
|
||||||
"contents_url": "https://api.github.com/repos/docker/test-docker-action/contents/{+path}",
|
|
||||||
"contributors_url": "https://api.github.com/repos/docker/test-docker-action/contributors",
|
|
||||||
"created_at": 1596792180,
|
|
||||||
"default_branch": "master",
|
|
||||||
"deployments_url": "https://api.github.com/repos/docker/test-docker-action/deployments",
|
|
||||||
"description": "Test \"Docker\" Actions",
|
|
||||||
"disabled": false,
|
|
||||||
"downloads_url": "https://api.github.com/repos/docker/test-docker-action/downloads",
|
|
||||||
"events_url": "https://api.github.com/repos/docker/test-docker-action/events",
|
|
||||||
"fork": false,
|
|
||||||
"forks": 1,
|
|
||||||
"forks_count": 1,
|
|
||||||
"forks_url": "https://api.github.com/repos/docker/test-docker-action/forks",
|
|
||||||
"full_name": "docker/test-docker-action",
|
|
||||||
"git_commits_url": "https://api.github.com/repos/docker/test-docker-action/git/commits{/sha}",
|
|
||||||
"git_refs_url": "https://api.github.com/repos/docker/test-docker-action/git/refs{/sha}",
|
|
||||||
"git_tags_url": "https://api.github.com/repos/docker/test-docker-action/git/tags{/sha}",
|
|
||||||
"git_url": "git://github.com/docker/test-docker-action.git",
|
|
||||||
"has_downloads": true,
|
|
||||||
"has_issues": true,
|
|
||||||
"has_pages": false,
|
|
||||||
"has_projects": true,
|
|
||||||
"has_wiki": true,
|
|
||||||
"homepage": "",
|
|
||||||
"hooks_url": "https://api.github.com/repos/docker/test-docker-action/hooks",
|
|
||||||
"html_url": "https://github.com/docker/test-docker-action",
|
|
||||||
"id": 285789493,
|
|
||||||
"is_template": false,
|
|
||||||
"issue_comment_url": "https://api.github.com/repos/docker/test-docker-action/issues/comments{/number}",
|
|
||||||
"issue_events_url": "https://api.github.com/repos/docker/test-docker-action/issues/events{/number}",
|
|
||||||
"issues_url": "https://api.github.com/repos/docker/test-docker-action/issues{/number}",
|
|
||||||
"keys_url": "https://api.github.com/repos/docker/test-docker-action/keys{/key_id}",
|
|
||||||
"labels_url": "https://api.github.com/repos/docker/test-docker-action/labels{/name}",
|
|
||||||
"language": "JavaScript",
|
|
||||||
"languages_url": "https://api.github.com/repos/docker/test-docker-action/languages",
|
|
||||||
"license": {
|
|
||||||
"key": "mit",
|
|
||||||
"name": "MIT License",
|
|
||||||
"node_id": "MDc6TGljZW5zZTEz",
|
|
||||||
"spdx_id": "MIT",
|
|
||||||
"url": "https://api.github.com/licenses/mit"
|
|
||||||
},
|
|
||||||
"master_branch": "master",
|
|
||||||
"merges_url": "https://api.github.com/repos/docker/test-docker-action/merges",
|
|
||||||
"milestones_url": "https://api.github.com/repos/docker/test-docker-action/milestones{/number}",
|
|
||||||
"mirror_url": null,
|
|
||||||
"name": "test-docker-action",
|
|
||||||
"node_id": "MDEwOlJlcG9zaXRvcnkyODU3ODk0OTM=",
|
|
||||||
"notifications_url": "https://api.github.com/repos/docker/test-docker-action/notifications{?since,all,participating}",
|
|
||||||
"open_issues": 6,
|
|
||||||
"open_issues_count": 6,
|
|
||||||
"organization": "docker",
|
|
||||||
"owner": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/5429470?v=4",
|
|
||||||
"email": "info@docker.com",
|
|
||||||
"events_url": "https://api.github.com/users/docker/events{/privacy}",
|
|
||||||
"followers_url": "https://api.github.com/users/docker/followers",
|
|
||||||
"following_url": "https://api.github.com/users/docker/following{/other_user}",
|
|
||||||
"gists_url": "https://api.github.com/users/docker/gists{/gist_id}",
|
|
||||||
"gravatar_id": "",
|
|
||||||
"html_url": "https://github.com/docker",
|
|
||||||
"id": 5429470,
|
|
||||||
"login": "docker",
|
|
||||||
"name": "docker",
|
|
||||||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjU0Mjk0NzA=",
|
|
||||||
"organizations_url": "https://api.github.com/users/docker/orgs",
|
|
||||||
"received_events_url": "https://api.github.com/users/docker/received_events",
|
|
||||||
"repos_url": "https://api.github.com/users/docker/repos",
|
|
||||||
"site_admin": false,
|
|
||||||
"starred_url": "https://api.github.com/users/docker/starred{/owner}{/repo}",
|
|
||||||
"subscriptions_url": "https://api.github.com/users/docker/subscriptions",
|
|
||||||
"type": "Organization",
|
|
||||||
"url": "https://api.github.com/users/docker"
|
|
||||||
},
|
|
||||||
"private": true,
|
|
||||||
"pulls_url": "https://api.github.com/repos/docker/test-docker-action/pulls{/number}",
|
|
||||||
"pushed_at": 1650360446,
|
|
||||||
"releases_url": "https://api.github.com/repos/docker/test-docker-action/releases{/id}",
|
|
||||||
"size": 796,
|
|
||||||
"ssh_url": "git@github.com:docker/test-docker-action.git",
|
|
||||||
"stargazers": 0,
|
|
||||||
"stargazers_count": 0,
|
|
||||||
"stargazers_url": "https://api.github.com/repos/docker/test-docker-action/stargazers",
|
|
||||||
"statuses_url": "https://api.github.com/repos/docker/test-docker-action/statuses/{sha}",
|
|
||||||
"subscribers_url": "https://api.github.com/repos/docker/test-docker-action/subscribers",
|
|
||||||
"subscription_url": "https://api.github.com/repos/docker/test-docker-action/subscription",
|
|
||||||
"svn_url": "https://github.com/docker/test-docker-action",
|
|
||||||
"tags_url": "https://api.github.com/repos/docker/test-docker-action/tags",
|
|
||||||
"teams_url": "https://api.github.com/repos/docker/test-docker-action/teams",
|
|
||||||
"topics": [],
|
|
||||||
"trees_url": "https://api.github.com/repos/docker/test-docker-action/git/trees{/sha}",
|
|
||||||
"updated_at": "2022-04-19T09:05:09Z",
|
|
||||||
"url": "https://github.com/docker/test-docker-action",
|
|
||||||
"visibility": "private",
|
|
||||||
"watchers": 0,
|
|
||||||
"watchers_count": 0
|
|
||||||
},
|
|
||||||
"sender": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/1951866?v=4",
|
|
||||||
"events_url": "https://api.github.com/users/crazy-max/events{/privacy}",
|
|
||||||
"followers_url": "https://api.github.com/users/crazy-max/followers",
|
|
||||||
"following_url": "https://api.github.com/users/crazy-max/following{/other_user}",
|
|
||||||
"gists_url": "https://api.github.com/users/crazy-max/gists{/gist_id}",
|
|
||||||
"gravatar_id": "",
|
|
||||||
"html_url": "https://github.com/crazy-max",
|
|
||||||
"id": 1951866,
|
|
||||||
"login": "crazy-max",
|
|
||||||
"node_id": "MDQ6VXNlcjE5NTE4NjY=",
|
|
||||||
"organizations_url": "https://api.github.com/users/crazy-max/orgs",
|
|
||||||
"received_events_url": "https://api.github.com/users/crazy-max/received_events",
|
|
||||||
"repos_url": "https://api.github.com/users/crazy-max/repos",
|
|
||||||
"site_admin": false,
|
|
||||||
"starred_url": "https://api.github.com/users/crazy-max/starred{/owner}{/repo}",
|
|
||||||
"subscriptions_url": "https://api.github.com/users/crazy-max/subscriptions",
|
|
||||||
"type": "User",
|
|
||||||
"url": "https://api.github.com/users/crazy-max"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,30 +0,0 @@
|
|||||||
GITHUB_ACTION=__crazy-max_ghaction-dump-context
|
|
||||||
GITHUB_ACTIONS=true
|
|
||||||
GITHUB_ACTION_PATH=/home/runner/work/_actions/crazy-max/ghaction-dump-context/v1
|
|
||||||
GITHUB_ACTION_REF=
|
|
||||||
GITHUB_ACTION_REPOSITORY=
|
|
||||||
GITHUB_ACTOR=crazy-max
|
|
||||||
GITHUB_API_URL=https://api.github.com
|
|
||||||
GITHUB_BASE_REF=
|
|
||||||
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_5d7d8f7f-4b47-4f4c-b32a-e7fa634790c9
|
|
||||||
GITHUB_EVENT_NAME=push
|
|
||||||
GITHUB_EVENT_PATH=./__tests__/fixtures/event_push_invalidchars.json
|
|
||||||
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
|
|
||||||
GITHUB_HEAD_REF=
|
|
||||||
GITHUB_JOB=test
|
|
||||||
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_5d7d8f7f-4b47-4f4c-b32a-e7fa634790c9
|
|
||||||
GITHUB_REF=refs/heads/my/feature#1245
|
|
||||||
GITHUB_REF_NAME=my/feature#1245
|
|
||||||
GITHUB_REF_PROTECTED=false
|
|
||||||
GITHUB_REF_TYPE=branch
|
|
||||||
GITHUB_REPOSITORY=docker/test-docker-action
|
|
||||||
GITHUB_REPOSITORY_OWNER=docker
|
|
||||||
GITHUB_RETENTION_DAYS=90
|
|
||||||
GITHUB_RUN_ATTEMPT=1
|
|
||||||
GITHUB_RUN_ID=2188792787
|
|
||||||
GITHUB_RUN_NUMBER=19
|
|
||||||
GITHUB_SERVER_URL=https://github.com
|
|
||||||
GITHUB_SHA=983315b5e8d46e46fc4c49869e85e7ee5fb289ba
|
|
||||||
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_5d7d8f7f-4b47-4f4c-b32a-e7fa634790c9
|
|
||||||
GITHUB_WORKFLOW=metadata
|
|
||||||
GITHUB_WORKSPACE=/home/runner/work/test-docker-action/test-docker-action
|
|
@ -1,195 +0,0 @@
|
|||||||
{
|
|
||||||
"after": "983315b5e8d46e46fc4c49869e85e7ee5fb289ba",
|
|
||||||
"base_ref": null,
|
|
||||||
"before": "4af2cc040e1cee6ee91e2491f34e5787121eb902",
|
|
||||||
"commits": [
|
|
||||||
{
|
|
||||||
"author": {
|
|
||||||
"email": "crazy-max@users.noreply.github.com",
|
|
||||||
"name": "CrazyMax",
|
|
||||||
"username": "crazy-max"
|
|
||||||
},
|
|
||||||
"committer": {
|
|
||||||
"email": "crazy-max@users.noreply.github.com",
|
|
||||||
"name": "CrazyMax",
|
|
||||||
"username": "crazy-max"
|
|
||||||
},
|
|
||||||
"distinct": true,
|
|
||||||
"id": "983315b5e8d46e46fc4c49869e85e7ee5fb289ba",
|
|
||||||
"message": "feature 1245",
|
|
||||||
"timestamp": "2022-04-19T11:36:08+02:00",
|
|
||||||
"tree_id": "e9f7b0bf689a49a4792d518088710dadb52d7e9a",
|
|
||||||
"url": "https://github.com/docker/test-docker-action/commit/983315b5e8d46e46fc4c49869e85e7ee5fb289ba"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"compare": "https://github.com/docker/test-docker-action/compare/4af2cc040e1c...983315b5e8d4",
|
|
||||||
"created": false,
|
|
||||||
"deleted": false,
|
|
||||||
"forced": true,
|
|
||||||
"head_commit": {
|
|
||||||
"author": {
|
|
||||||
"email": "crazy-max@users.noreply.github.com",
|
|
||||||
"name": "CrazyMax",
|
|
||||||
"username": "crazy-max"
|
|
||||||
},
|
|
||||||
"committer": {
|
|
||||||
"email": "crazy-max@users.noreply.github.com",
|
|
||||||
"name": "CrazyMax",
|
|
||||||
"username": "crazy-max"
|
|
||||||
},
|
|
||||||
"distinct": true,
|
|
||||||
"id": "983315b5e8d46e46fc4c49869e85e7ee5fb289ba",
|
|
||||||
"message": "feature 1245",
|
|
||||||
"timestamp": "2022-04-19T11:36:08+02:00",
|
|
||||||
"tree_id": "e9f7b0bf689a49a4792d518088710dadb52d7e9a",
|
|
||||||
"url": "https://github.com/docker/test-docker-action/commit/983315b5e8d46e46fc4c49869e85e7ee5fb289ba"
|
|
||||||
},
|
|
||||||
"organization": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/5429470?v=4",
|
|
||||||
"description": "Docker helps developers bring their ideas to life by conquering the complexity of app development.",
|
|
||||||
"events_url": "https://api.github.com/orgs/docker/events",
|
|
||||||
"hooks_url": "https://api.github.com/orgs/docker/hooks",
|
|
||||||
"id": 5429470,
|
|
||||||
"issues_url": "https://api.github.com/orgs/docker/issues",
|
|
||||||
"login": "docker",
|
|
||||||
"members_url": "https://api.github.com/orgs/docker/members{/member}",
|
|
||||||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjU0Mjk0NzA=",
|
|
||||||
"public_members_url": "https://api.github.com/orgs/docker/public_members{/member}",
|
|
||||||
"repos_url": "https://api.github.com/orgs/docker/repos",
|
|
||||||
"url": "https://api.github.com/orgs/docker"
|
|
||||||
},
|
|
||||||
"pusher": {
|
|
||||||
"email": "github@crazymax.dev",
|
|
||||||
"name": "crazy-max"
|
|
||||||
},
|
|
||||||
"ref": "refs/heads/my/feature#1245",
|
|
||||||
"repository": {
|
|
||||||
"allow_forking": true,
|
|
||||||
"archive_url": "https://api.github.com/repos/docker/test-docker-action/{archive_format}{/ref}",
|
|
||||||
"archived": false,
|
|
||||||
"assignees_url": "https://api.github.com/repos/docker/test-docker-action/assignees{/user}",
|
|
||||||
"blobs_url": "https://api.github.com/repos/docker/test-docker-action/git/blobs{/sha}",
|
|
||||||
"branches_url": "https://api.github.com/repos/docker/test-docker-action/branches{/branch}",
|
|
||||||
"clone_url": "https://github.com/docker/test-docker-action.git",
|
|
||||||
"collaborators_url": "https://api.github.com/repos/docker/test-docker-action/collaborators{/collaborator}",
|
|
||||||
"comments_url": "https://api.github.com/repos/docker/test-docker-action/comments{/number}",
|
|
||||||
"commits_url": "https://api.github.com/repos/docker/test-docker-action/commits{/sha}",
|
|
||||||
"compare_url": "https://api.github.com/repos/docker/test-docker-action/compare/{base}...{head}",
|
|
||||||
"contents_url": "https://api.github.com/repos/docker/test-docker-action/contents/{+path}",
|
|
||||||
"contributors_url": "https://api.github.com/repos/docker/test-docker-action/contributors",
|
|
||||||
"created_at": 1596792180,
|
|
||||||
"default_branch": "master",
|
|
||||||
"deployments_url": "https://api.github.com/repos/docker/test-docker-action/deployments",
|
|
||||||
"description": "Test \"Docker\" Actions",
|
|
||||||
"disabled": false,
|
|
||||||
"downloads_url": "https://api.github.com/repos/docker/test-docker-action/downloads",
|
|
||||||
"events_url": "https://api.github.com/repos/docker/test-docker-action/events",
|
|
||||||
"fork": false,
|
|
||||||
"forks": 1,
|
|
||||||
"forks_count": 1,
|
|
||||||
"forks_url": "https://api.github.com/repos/docker/test-docker-action/forks",
|
|
||||||
"full_name": "docker/test-docker-action",
|
|
||||||
"git_commits_url": "https://api.github.com/repos/docker/test-docker-action/git/commits{/sha}",
|
|
||||||
"git_refs_url": "https://api.github.com/repos/docker/test-docker-action/git/refs{/sha}",
|
|
||||||
"git_tags_url": "https://api.github.com/repos/docker/test-docker-action/git/tags{/sha}",
|
|
||||||
"git_url": "git://github.com/docker/test-docker-action.git",
|
|
||||||
"has_downloads": true,
|
|
||||||
"has_issues": true,
|
|
||||||
"has_pages": false,
|
|
||||||
"has_projects": true,
|
|
||||||
"has_wiki": true,
|
|
||||||
"homepage": "",
|
|
||||||
"hooks_url": "https://api.github.com/repos/docker/test-docker-action/hooks",
|
|
||||||
"html_url": "https://github.com/docker/test-docker-action",
|
|
||||||
"id": 285789493,
|
|
||||||
"is_template": false,
|
|
||||||
"issue_comment_url": "https://api.github.com/repos/docker/test-docker-action/issues/comments{/number}",
|
|
||||||
"issue_events_url": "https://api.github.com/repos/docker/test-docker-action/issues/events{/number}",
|
|
||||||
"issues_url": "https://api.github.com/repos/docker/test-docker-action/issues{/number}",
|
|
||||||
"keys_url": "https://api.github.com/repos/docker/test-docker-action/keys{/key_id}",
|
|
||||||
"labels_url": "https://api.github.com/repos/docker/test-docker-action/labels{/name}",
|
|
||||||
"language": "JavaScript",
|
|
||||||
"languages_url": "https://api.github.com/repos/docker/test-docker-action/languages",
|
|
||||||
"license": {
|
|
||||||
"key": "mit",
|
|
||||||
"name": "MIT License",
|
|
||||||
"node_id": "MDc6TGljZW5zZTEz",
|
|
||||||
"spdx_id": "MIT",
|
|
||||||
"url": "https://api.github.com/licenses/mit"
|
|
||||||
},
|
|
||||||
"master_branch": "master",
|
|
||||||
"merges_url": "https://api.github.com/repos/docker/test-docker-action/merges",
|
|
||||||
"milestones_url": "https://api.github.com/repos/docker/test-docker-action/milestones{/number}",
|
|
||||||
"mirror_url": null,
|
|
||||||
"name": "test-docker-action",
|
|
||||||
"node_id": "MDEwOlJlcG9zaXRvcnkyODU3ODk0OTM=",
|
|
||||||
"notifications_url": "https://api.github.com/repos/docker/test-docker-action/notifications{?since,all,participating}",
|
|
||||||
"open_issues": 6,
|
|
||||||
"open_issues_count": 6,
|
|
||||||
"organization": "docker",
|
|
||||||
"owner": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/5429470?v=4",
|
|
||||||
"email": "info@docker.com",
|
|
||||||
"events_url": "https://api.github.com/users/docker/events{/privacy}",
|
|
||||||
"followers_url": "https://api.github.com/users/docker/followers",
|
|
||||||
"following_url": "https://api.github.com/users/docker/following{/other_user}",
|
|
||||||
"gists_url": "https://api.github.com/users/docker/gists{/gist_id}",
|
|
||||||
"gravatar_id": "",
|
|
||||||
"html_url": "https://github.com/docker",
|
|
||||||
"id": 5429470,
|
|
||||||
"login": "docker",
|
|
||||||
"name": "docker",
|
|
||||||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjU0Mjk0NzA=",
|
|
||||||
"organizations_url": "https://api.github.com/users/docker/orgs",
|
|
||||||
"received_events_url": "https://api.github.com/users/docker/received_events",
|
|
||||||
"repos_url": "https://api.github.com/users/docker/repos",
|
|
||||||
"site_admin": false,
|
|
||||||
"starred_url": "https://api.github.com/users/docker/starred{/owner}{/repo}",
|
|
||||||
"subscriptions_url": "https://api.github.com/users/docker/subscriptions",
|
|
||||||
"type": "Organization",
|
|
||||||
"url": "https://api.github.com/users/docker"
|
|
||||||
},
|
|
||||||
"private": true,
|
|
||||||
"pulls_url": "https://api.github.com/repos/docker/test-docker-action/pulls{/number}",
|
|
||||||
"pushed_at": 1650360972,
|
|
||||||
"releases_url": "https://api.github.com/repos/docker/test-docker-action/releases{/id}",
|
|
||||||
"size": 796,
|
|
||||||
"ssh_url": "git@github.com:docker/test-docker-action.git",
|
|
||||||
"stargazers": 0,
|
|
||||||
"stargazers_count": 0,
|
|
||||||
"stargazers_url": "https://api.github.com/repos/docker/test-docker-action/stargazers",
|
|
||||||
"statuses_url": "https://api.github.com/repos/docker/test-docker-action/statuses/{sha}",
|
|
||||||
"subscribers_url": "https://api.github.com/repos/docker/test-docker-action/subscribers",
|
|
||||||
"subscription_url": "https://api.github.com/repos/docker/test-docker-action/subscription",
|
|
||||||
"svn_url": "https://github.com/docker/test-docker-action",
|
|
||||||
"tags_url": "https://api.github.com/repos/docker/test-docker-action/tags",
|
|
||||||
"teams_url": "https://api.github.com/repos/docker/test-docker-action/teams",
|
|
||||||
"topics": [],
|
|
||||||
"trees_url": "https://api.github.com/repos/docker/test-docker-action/git/trees{/sha}",
|
|
||||||
"updated_at": "2022-04-19T09:05:09Z",
|
|
||||||
"url": "https://github.com/docker/test-docker-action",
|
|
||||||
"visibility": "private",
|
|
||||||
"watchers": 0,
|
|
||||||
"watchers_count": 0
|
|
||||||
},
|
|
||||||
"sender": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/1951866?v=4",
|
|
||||||
"events_url": "https://api.github.com/users/crazy-max/events{/privacy}",
|
|
||||||
"followers_url": "https://api.github.com/users/crazy-max/followers",
|
|
||||||
"following_url": "https://api.github.com/users/crazy-max/following{/other_user}",
|
|
||||||
"gists_url": "https://api.github.com/users/crazy-max/gists{/gist_id}",
|
|
||||||
"gravatar_id": "",
|
|
||||||
"html_url": "https://github.com/crazy-max",
|
|
||||||
"id": 1951866,
|
|
||||||
"login": "crazy-max",
|
|
||||||
"node_id": "MDQ6VXNlcjE5NTE4NjY=",
|
|
||||||
"organizations_url": "https://api.github.com/users/crazy-max/orgs",
|
|
||||||
"received_events_url": "https://api.github.com/users/crazy-max/received_events",
|
|
||||||
"repos_url": "https://api.github.com/users/crazy-max/repos",
|
|
||||||
"site_admin": false,
|
|
||||||
"starred_url": "https://api.github.com/users/crazy-max/starred{/owner}{/repo}",
|
|
||||||
"subscriptions_url": "https://api.github.com/users/crazy-max/subscriptions",
|
|
||||||
"type": "User",
|
|
||||||
"url": "https://api.github.com/users/crazy-max"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,30 +0,0 @@
|
|||||||
GITHUB_ACTION=__crazy-max_ghaction-dump-context
|
|
||||||
GITHUB_ACTIONS=true
|
|
||||||
GITHUB_ACTION_PATH=/home/runner/work/_actions/crazy-max/ghaction-dump-context/v1
|
|
||||||
GITHUB_ACTION_REF=
|
|
||||||
GITHUB_ACTION_REPOSITORY=
|
|
||||||
GITHUB_ACTOR=crazy-max
|
|
||||||
GITHUB_API_URL=https://api.github.com
|
|
||||||
GITHUB_BASE_REF=
|
|
||||||
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_f5600b76-1b08-404a-8e90-7f2cd620928b
|
|
||||||
GITHUB_EVENT_NAME=push
|
|
||||||
GITHUB_EVENT_PATH=./__tests__/fixtures/event_push_master.json
|
|
||||||
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
|
|
||||||
GITHUB_HEAD_REF=
|
|
||||||
GITHUB_JOB=test
|
|
||||||
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_f5600b76-1b08-404a-8e90-7f2cd620928b
|
|
||||||
GITHUB_REF=refs/heads/master
|
|
||||||
GITHUB_REF_NAME=master
|
|
||||||
GITHUB_REF_PROTECTED=false
|
|
||||||
GITHUB_REF_TYPE=branch
|
|
||||||
GITHUB_REPOSITORY=docker/test-docker-action
|
|
||||||
GITHUB_REPOSITORY_OWNER=docker
|
|
||||||
GITHUB_RETENTION_DAYS=90
|
|
||||||
GITHUB_RUN_ATTEMPT=1
|
|
||||||
GITHUB_RUN_ID=2188627423
|
|
||||||
GITHUB_RUN_NUMBER=6
|
|
||||||
GITHUB_SERVER_URL=https://github.com
|
|
||||||
GITHUB_SHA=266574110acf203503badf966df2ea24b5d732d7
|
|
||||||
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_f5600b76-1b08-404a-8e90-7f2cd620928b
|
|
||||||
GITHUB_WORKFLOW=metadata
|
|
||||||
GITHUB_WORKSPACE=/home/runner/work/test-docker-action/test-docker-action
|
|
@ -1,195 +0,0 @@
|
|||||||
{
|
|
||||||
"after": "266574110acf203503badf966df2ea24b5d732d7",
|
|
||||||
"base_ref": null,
|
|
||||||
"before": "ef1a8e2e6a91ffa6837f19f7743405b709363225",
|
|
||||||
"commits": [
|
|
||||||
{
|
|
||||||
"author": {
|
|
||||||
"email": "crazy-max@users.noreply.github.com",
|
|
||||||
"name": "CrazyMax",
|
|
||||||
"username": "crazy-max"
|
|
||||||
},
|
|
||||||
"committer": {
|
|
||||||
"email": "crazy-max@users.noreply.github.com",
|
|
||||||
"name": "CrazyMax",
|
|
||||||
"username": "crazy-max"
|
|
||||||
},
|
|
||||||
"distinct": true,
|
|
||||||
"id": "266574110acf203503badf966df2ea24b5d732d7",
|
|
||||||
"message": "more events",
|
|
||||||
"timestamp": "2022-04-19T11:04:39+02:00",
|
|
||||||
"tree_id": "03b667a843ece33c75ef5eb23ca5bc8fc3b876e4",
|
|
||||||
"url": "https://github.com/docker/test-docker-action/commit/266574110acf203503badf966df2ea24b5d732d7"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"compare": "https://github.com/docker/test-docker-action/compare/ef1a8e2e6a91...266574110acf",
|
|
||||||
"created": false,
|
|
||||||
"deleted": false,
|
|
||||||
"forced": false,
|
|
||||||
"head_commit": {
|
|
||||||
"author": {
|
|
||||||
"email": "crazy-max@users.noreply.github.com",
|
|
||||||
"name": "CrazyMax",
|
|
||||||
"username": "crazy-max"
|
|
||||||
},
|
|
||||||
"committer": {
|
|
||||||
"email": "crazy-max@users.noreply.github.com",
|
|
||||||
"name": "CrazyMax",
|
|
||||||
"username": "crazy-max"
|
|
||||||
},
|
|
||||||
"distinct": true,
|
|
||||||
"id": "266574110acf203503badf966df2ea24b5d732d7",
|
|
||||||
"message": "more events",
|
|
||||||
"timestamp": "2022-04-19T11:04:39+02:00",
|
|
||||||
"tree_id": "03b667a843ece33c75ef5eb23ca5bc8fc3b876e4",
|
|
||||||
"url": "https://github.com/docker/test-docker-action/commit/266574110acf203503badf966df2ea24b5d732d7"
|
|
||||||
},
|
|
||||||
"organization": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/5429470?v=4",
|
|
||||||
"description": "Docker helps developers bring their ideas to life by conquering the complexity of app development.",
|
|
||||||
"events_url": "https://api.github.com/orgs/docker/events",
|
|
||||||
"hooks_url": "https://api.github.com/orgs/docker/hooks",
|
|
||||||
"id": 5429470,
|
|
||||||
"issues_url": "https://api.github.com/orgs/docker/issues",
|
|
||||||
"login": "docker",
|
|
||||||
"members_url": "https://api.github.com/orgs/docker/members{/member}",
|
|
||||||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjU0Mjk0NzA=",
|
|
||||||
"public_members_url": "https://api.github.com/orgs/docker/public_members{/member}",
|
|
||||||
"repos_url": "https://api.github.com/orgs/docker/repos",
|
|
||||||
"url": "https://api.github.com/orgs/docker"
|
|
||||||
},
|
|
||||||
"pusher": {
|
|
||||||
"email": "github@crazymax.dev",
|
|
||||||
"name": "crazy-max"
|
|
||||||
},
|
|
||||||
"ref": "refs/heads/master",
|
|
||||||
"repository": {
|
|
||||||
"allow_forking": true,
|
|
||||||
"archive_url": "https://api.github.com/repos/docker/test-docker-action/{archive_format}{/ref}",
|
|
||||||
"archived": false,
|
|
||||||
"assignees_url": "https://api.github.com/repos/docker/test-docker-action/assignees{/user}",
|
|
||||||
"blobs_url": "https://api.github.com/repos/docker/test-docker-action/git/blobs{/sha}",
|
|
||||||
"branches_url": "https://api.github.com/repos/docker/test-docker-action/branches{/branch}",
|
|
||||||
"clone_url": "https://github.com/docker/test-docker-action.git",
|
|
||||||
"collaborators_url": "https://api.github.com/repos/docker/test-docker-action/collaborators{/collaborator}",
|
|
||||||
"comments_url": "https://api.github.com/repos/docker/test-docker-action/comments{/number}",
|
|
||||||
"commits_url": "https://api.github.com/repos/docker/test-docker-action/commits{/sha}",
|
|
||||||
"compare_url": "https://api.github.com/repos/docker/test-docker-action/compare/{base}...{head}",
|
|
||||||
"contents_url": "https://api.github.com/repos/docker/test-docker-action/contents/{+path}",
|
|
||||||
"contributors_url": "https://api.github.com/repos/docker/test-docker-action/contributors",
|
|
||||||
"created_at": 1596792180,
|
|
||||||
"default_branch": "master",
|
|
||||||
"deployments_url": "https://api.github.com/repos/docker/test-docker-action/deployments",
|
|
||||||
"description": "Test \"Docker\" Actions",
|
|
||||||
"disabled": false,
|
|
||||||
"downloads_url": "https://api.github.com/repos/docker/test-docker-action/downloads",
|
|
||||||
"events_url": "https://api.github.com/repos/docker/test-docker-action/events",
|
|
||||||
"fork": false,
|
|
||||||
"forks": 1,
|
|
||||||
"forks_count": 1,
|
|
||||||
"forks_url": "https://api.github.com/repos/docker/test-docker-action/forks",
|
|
||||||
"full_name": "docker/test-docker-action",
|
|
||||||
"git_commits_url": "https://api.github.com/repos/docker/test-docker-action/git/commits{/sha}",
|
|
||||||
"git_refs_url": "https://api.github.com/repos/docker/test-docker-action/git/refs{/sha}",
|
|
||||||
"git_tags_url": "https://api.github.com/repos/docker/test-docker-action/git/tags{/sha}",
|
|
||||||
"git_url": "git://github.com/docker/test-docker-action.git",
|
|
||||||
"has_downloads": true,
|
|
||||||
"has_issues": false,
|
|
||||||
"has_pages": false,
|
|
||||||
"has_projects": false,
|
|
||||||
"has_wiki": false,
|
|
||||||
"homepage": "",
|
|
||||||
"hooks_url": "https://api.github.com/repos/docker/test-docker-action/hooks",
|
|
||||||
"html_url": "https://github.com/docker/test-docker-action",
|
|
||||||
"id": 285789493,
|
|
||||||
"is_template": false,
|
|
||||||
"issue_comment_url": "https://api.github.com/repos/docker/test-docker-action/issues/comments{/number}",
|
|
||||||
"issue_events_url": "https://api.github.com/repos/docker/test-docker-action/issues/events{/number}",
|
|
||||||
"issues_url": "https://api.github.com/repos/docker/test-docker-action/issues{/number}",
|
|
||||||
"keys_url": "https://api.github.com/repos/docker/test-docker-action/keys{/key_id}",
|
|
||||||
"labels_url": "https://api.github.com/repos/docker/test-docker-action/labels{/name}",
|
|
||||||
"language": "JavaScript",
|
|
||||||
"languages_url": "https://api.github.com/repos/docker/test-docker-action/languages",
|
|
||||||
"license": {
|
|
||||||
"key": "mit",
|
|
||||||
"name": "MIT License",
|
|
||||||
"node_id": "MDc6TGljZW5zZTEz",
|
|
||||||
"spdx_id": "MIT",
|
|
||||||
"url": "https://api.github.com/licenses/mit"
|
|
||||||
},
|
|
||||||
"master_branch": "master",
|
|
||||||
"merges_url": "https://api.github.com/repos/docker/test-docker-action/merges",
|
|
||||||
"milestones_url": "https://api.github.com/repos/docker/test-docker-action/milestones{/number}",
|
|
||||||
"mirror_url": null,
|
|
||||||
"name": "test-docker-action",
|
|
||||||
"node_id": "MDEwOlJlcG9zaXRvcnkyODU3ODk0OTM=",
|
|
||||||
"notifications_url": "https://api.github.com/repos/docker/test-docker-action/notifications{?since,all,participating}",
|
|
||||||
"open_issues": 4,
|
|
||||||
"open_issues_count": 4,
|
|
||||||
"organization": "docker",
|
|
||||||
"owner": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/5429470?v=4",
|
|
||||||
"email": "info@docker.com",
|
|
||||||
"events_url": "https://api.github.com/users/docker/events{/privacy}",
|
|
||||||
"followers_url": "https://api.github.com/users/docker/followers",
|
|
||||||
"following_url": "https://api.github.com/users/docker/following{/other_user}",
|
|
||||||
"gists_url": "https://api.github.com/users/docker/gists{/gist_id}",
|
|
||||||
"gravatar_id": "",
|
|
||||||
"html_url": "https://github.com/docker",
|
|
||||||
"id": 5429470,
|
|
||||||
"login": "docker",
|
|
||||||
"name": "docker",
|
|
||||||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjU0Mjk0NzA=",
|
|
||||||
"organizations_url": "https://api.github.com/users/docker/orgs",
|
|
||||||
"received_events_url": "https://api.github.com/users/docker/received_events",
|
|
||||||
"repos_url": "https://api.github.com/users/docker/repos",
|
|
||||||
"site_admin": false,
|
|
||||||
"starred_url": "https://api.github.com/users/docker/starred{/owner}{/repo}",
|
|
||||||
"subscriptions_url": "https://api.github.com/users/docker/subscriptions",
|
|
||||||
"type": "Organization",
|
|
||||||
"url": "https://api.github.com/users/docker"
|
|
||||||
},
|
|
||||||
"private": true,
|
|
||||||
"pulls_url": "https://api.github.com/repos/docker/test-docker-action/pulls{/number}",
|
|
||||||
"pushed_at": 1650359090,
|
|
||||||
"releases_url": "https://api.github.com/repos/docker/test-docker-action/releases{/id}",
|
|
||||||
"size": 796,
|
|
||||||
"ssh_url": "git@github.com:docker/test-docker-action.git",
|
|
||||||
"stargazers": 0,
|
|
||||||
"stargazers_count": 0,
|
|
||||||
"stargazers_url": "https://api.github.com/repos/docker/test-docker-action/stargazers",
|
|
||||||
"statuses_url": "https://api.github.com/repos/docker/test-docker-action/statuses/{sha}",
|
|
||||||
"subscribers_url": "https://api.github.com/repos/docker/test-docker-action/subscribers",
|
|
||||||
"subscription_url": "https://api.github.com/repos/docker/test-docker-action/subscription",
|
|
||||||
"svn_url": "https://github.com/docker/test-docker-action",
|
|
||||||
"tags_url": "https://api.github.com/repos/docker/test-docker-action/tags",
|
|
||||||
"teams_url": "https://api.github.com/repos/docker/test-docker-action/teams",
|
|
||||||
"topics": [],
|
|
||||||
"trees_url": "https://api.github.com/repos/docker/test-docker-action/git/trees{/sha}",
|
|
||||||
"updated_at": "2021-12-21T21:49:29Z",
|
|
||||||
"url": "https://github.com/docker/test-docker-action",
|
|
||||||
"visibility": "private",
|
|
||||||
"watchers": 0,
|
|
||||||
"watchers_count": 0
|
|
||||||
},
|
|
||||||
"sender": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/1951866?v=4",
|
|
||||||
"events_url": "https://api.github.com/users/crazy-max/events{/privacy}",
|
|
||||||
"followers_url": "https://api.github.com/users/crazy-max/followers",
|
|
||||||
"following_url": "https://api.github.com/users/crazy-max/following{/other_user}",
|
|
||||||
"gists_url": "https://api.github.com/users/crazy-max/gists{/gist_id}",
|
|
||||||
"gravatar_id": "",
|
|
||||||
"html_url": "https://github.com/crazy-max",
|
|
||||||
"id": 1951866,
|
|
||||||
"login": "crazy-max",
|
|
||||||
"node_id": "MDQ6VXNlcjE5NTE4NjY=",
|
|
||||||
"organizations_url": "https://api.github.com/users/crazy-max/orgs",
|
|
||||||
"received_events_url": "https://api.github.com/users/crazy-max/received_events",
|
|
||||||
"repos_url": "https://api.github.com/users/crazy-max/repos",
|
|
||||||
"site_admin": false,
|
|
||||||
"starred_url": "https://api.github.com/users/crazy-max/starred{/owner}{/repo}",
|
|
||||||
"subscriptions_url": "https://api.github.com/users/crazy-max/subscriptions",
|
|
||||||
"type": "User",
|
|
||||||
"url": "https://api.github.com/users/crazy-max"
|
|
||||||
}
|
|
||||||
}
|
|
23
__tests__/fixtures/event_release.env
Normal file
23
__tests__/fixtures/event_release.env
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
GITHUB_ACTION=crazy-maxghaction-dump-context
|
||||||
|
GITHUB_ACTIONS=true
|
||||||
|
GITHUB_ACTION_PATH=/home/runner/work/_actions/crazy-max/ghaction-dump-context/v1
|
||||||
|
GITHUB_ACTOR=crazy-max
|
||||||
|
GITHUB_API_URL=https://api.github.com
|
||||||
|
GITHUB_BASE_REF=
|
||||||
|
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_7c207886-8ce7-4ad2-9b7f-f59dae4e5cf3
|
||||||
|
GITHUB_EVENT_NAME=release
|
||||||
|
#GITHUB_EVENT_PATH=/home/runner/work/_temp/_github_workflow/event.json
|
||||||
|
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
|
||||||
|
GITHUB_HEAD_REF=
|
||||||
|
GITHUB_JOB=event
|
||||||
|
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_7c207886-8ce7-4ad2-9b7f-f59dae4e5cf3
|
||||||
|
GITHUB_REF=refs/tags/v1.1.1
|
||||||
|
GITHUB_REPOSITORY=crazy-max/test-docker-action
|
||||||
|
GITHUB_REPOSITORY_OWNER=crazy-max
|
||||||
|
GITHUB_RETENTION_DAYS=90
|
||||||
|
GITHUB_RUN_ID=325970352
|
||||||
|
GITHUB_RUN_NUMBER=5
|
||||||
|
GITHUB_SERVER_URL=https://github.com
|
||||||
|
GITHUB_SHA=90dd6032fac8bda1b6c4436a2e65de27961ed071
|
||||||
|
GITHUB_WORKFLOW=event
|
||||||
|
GITHUB_WORKSPACE=/home/runner/work/test-docker-action/test-docker-action
|
@ -1,30 +0,0 @@
|
|||||||
GITHUB_ACTION=__crazy-max_ghaction-dump-context
|
|
||||||
GITHUB_ACTIONS=true
|
|
||||||
GITHUB_ACTION_PATH=/home/runner/work/_actions/crazy-max/ghaction-dump-context/v1
|
|
||||||
GITHUB_ACTION_REF=
|
|
||||||
GITHUB_ACTION_REPOSITORY=
|
|
||||||
GITHUB_ACTOR=crazy-max
|
|
||||||
GITHUB_API_URL=https://api.github.com
|
|
||||||
GITHUB_BASE_REF=
|
|
||||||
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_82c844c7-54b3-4b5d-a1e1-4f9f2e936d4f
|
|
||||||
GITHUB_EVENT_NAME=release
|
|
||||||
GITHUB_EVENT_PATH=./__tests__/fixtures/event_release_created.json
|
|
||||||
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
|
|
||||||
GITHUB_HEAD_REF=
|
|
||||||
GITHUB_JOB=test
|
|
||||||
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_82c844c7-54b3-4b5d-a1e1-4f9f2e936d4f
|
|
||||||
GITHUB_REF=refs/tags/v1.1.1
|
|
||||||
GITHUB_REF_NAME=v1.1.1
|
|
||||||
GITHUB_REF_PROTECTED=false
|
|
||||||
GITHUB_REF_TYPE=tag
|
|
||||||
GITHUB_REPOSITORY=docker/test-docker-action
|
|
||||||
GITHUB_REPOSITORY_OWNER=docker
|
|
||||||
GITHUB_RETENTION_DAYS=90
|
|
||||||
GITHUB_RUN_ATTEMPT=1
|
|
||||||
GITHUB_RUN_ID=2188867972
|
|
||||||
GITHUB_RUN_NUMBER=26
|
|
||||||
GITHUB_SERVER_URL=https://github.com
|
|
||||||
GITHUB_SHA=860c1904a1ce19322e91ac35af1ab07466440c37
|
|
||||||
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_82c844c7-54b3-4b5d-a1e1-4f9f2e936d4f
|
|
||||||
GITHUB_WORKFLOW=metadata
|
|
||||||
GITHUB_WORKSPACE=/home/runner/work/test-docker-action/test-docker-action
|
|
@ -1,80 +0,0 @@
|
|||||||
{
|
|
||||||
"action": "created",
|
|
||||||
"organization": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/5429470?v=4",
|
|
||||||
"description": "Docker helps developers bring their ideas to life by conquering the complexity of app development.",
|
|
||||||
"events_url": "https://api.github.com/orgs/docker/events",
|
|
||||||
"hooks_url": "https://api.github.com/orgs/docker/hooks",
|
|
||||||
"id": 5429470,
|
|
||||||
"issues_url": "https://api.github.com/orgs/docker/issues",
|
|
||||||
"login": "docker",
|
|
||||||
"members_url": "https://api.github.com/orgs/docker/members{/member}",
|
|
||||||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjU0Mjk0NzA=",
|
|
||||||
"public_members_url": "https://api.github.com/orgs/docker/public_members{/member}",
|
|
||||||
"repos_url": "https://api.github.com/orgs/docker/repos",
|
|
||||||
"url": "https://api.github.com/orgs/docker"
|
|
||||||
},
|
|
||||||
"release": {
|
|
||||||
"assets": [],
|
|
||||||
"assets_url": "https://api.github.com/repos/docker/test-docker-action/releases/64718198/assets",
|
|
||||||
"author": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/1951866?v=4",
|
|
||||||
"events_url": "https://api.github.com/users/crazy-max/events{/privacy}",
|
|
||||||
"followers_url": "https://api.github.com/users/crazy-max/followers",
|
|
||||||
"following_url": "https://api.github.com/users/crazy-max/following{/other_user}",
|
|
||||||
"gists_url": "https://api.github.com/users/crazy-max/gists{/gist_id}",
|
|
||||||
"gravatar_id": "",
|
|
||||||
"html_url": "https://github.com/crazy-max",
|
|
||||||
"id": 1951866,
|
|
||||||
"login": "crazy-max",
|
|
||||||
"node_id": "MDQ6VXNlcjE5NTE4NjY=",
|
|
||||||
"organizations_url": "https://api.github.com/users/crazy-max/orgs",
|
|
||||||
"received_events_url": "https://api.github.com/users/crazy-max/received_events",
|
|
||||||
"repos_url": "https://api.github.com/users/crazy-max/repos",
|
|
||||||
"site_admin": false,
|
|
||||||
"starred_url": "https://api.github.com/users/crazy-max/starred{/owner}{/repo}",
|
|
||||||
"subscriptions_url": "https://api.github.com/users/crazy-max/subscriptions",
|
|
||||||
"type": "User",
|
|
||||||
"url": "https://api.github.com/users/crazy-max"
|
|
||||||
},
|
|
||||||
"body": "foo",
|
|
||||||
"created_at": "2022-04-19T09:39:35Z",
|
|
||||||
"draft": false,
|
|
||||||
"html_url": "https://github.com/docker/test-docker-action/releases/tag/v1.1.1",
|
|
||||||
"id": 64718198,
|
|
||||||
"name": "v1.1.1",
|
|
||||||
"node_id": "RE_kwDOEQjNNc4D24V2",
|
|
||||||
"prerelease": true,
|
|
||||||
"subscription_url": "https://api.github.com/repos/docker/test-docker-action/subscription",
|
|
||||||
"svn_url": "https://github.com/docker/test-docker-action",
|
|
||||||
"tags_url": "https://api.github.com/repos/docker/test-docker-action/tags",
|
|
||||||
"teams_url": "https://api.github.com/repos/docker/test-docker-action/teams",
|
|
||||||
"topics": [],
|
|
||||||
"trees_url": "https://api.github.com/repos/docker/test-docker-action/git/trees{/sha}",
|
|
||||||
"updated_at": "2022-04-19T09:05:09Z",
|
|
||||||
"url": "https://api.github.com/repos/docker/test-docker-action",
|
|
||||||
"visibility": "private",
|
|
||||||
"watchers": 0,
|
|
||||||
"watchers_count": 0
|
|
||||||
},
|
|
||||||
"sender": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/1951866?v=4",
|
|
||||||
"events_url": "https://api.github.com/users/crazy-max/events{/privacy}",
|
|
||||||
"followers_url": "https://api.github.com/users/crazy-max/followers",
|
|
||||||
"following_url": "https://api.github.com/users/crazy-max/following{/other_user}",
|
|
||||||
"gists_url": "https://api.github.com/users/crazy-max/gists{/gist_id}",
|
|
||||||
"gravatar_id": "",
|
|
||||||
"html_url": "https://github.com/crazy-max",
|
|
||||||
"id": 1951866,
|
|
||||||
"login": "crazy-max",
|
|
||||||
"node_id": "MDQ6VXNlcjE5NTE4NjY=",
|
|
||||||
"organizations_url": "https://api.github.com/users/crazy-max/orgs",
|
|
||||||
"received_events_url": "https://api.github.com/users/crazy-max/received_events",
|
|
||||||
"repos_url": "https://api.github.com/users/crazy-max/repos",
|
|
||||||
"site_admin": false,
|
|
||||||
"starred_url": "https://api.github.com/users/crazy-max/starred{/owner}{/repo}",
|
|
||||||
"subscriptions_url": "https://api.github.com/users/crazy-max/subscriptions",
|
|
||||||
"type": "User",
|
|
||||||
"url": "https://api.github.com/users/crazy-max"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,30 +1,23 @@
|
|||||||
GITHUB_ACTION=__crazy-max_ghaction-dump-context
|
GITHUB_ACTION=crazy-maxghaction-dump-context
|
||||||
GITHUB_ACTIONS=true
|
GITHUB_ACTIONS=true
|
||||||
GITHUB_ACTION_PATH=/home/runner/work/_actions/crazy-max/ghaction-dump-context/v1
|
GITHUB_ACTION_PATH=/home/runner/work/_actions/crazy-max/ghaction-dump-context/v1
|
||||||
GITHUB_ACTION_REF=
|
|
||||||
GITHUB_ACTION_REPOSITORY=
|
|
||||||
GITHUB_ACTOR=crazy-max
|
GITHUB_ACTOR=crazy-max
|
||||||
GITHUB_API_URL=https://api.github.com
|
GITHUB_API_URL=https://api.github.com
|
||||||
GITHUB_BASE_REF=
|
GITHUB_BASE_REF=
|
||||||
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_c8594ff3-bed7-4fb7-b495-c63872db99a2
|
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_5705dc72-e111-46f1-9421-a77a2daec643
|
||||||
GITHUB_EVENT_NAME=schedule
|
GITHUB_EVENT_NAME=schedule
|
||||||
GITHUB_EVENT_PATH=./__tests__/fixtures/event_schedule.json
|
#GITHUB_EVENT_PATH=/home/runner/work/_temp/_github_workflow/event.json
|
||||||
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
|
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
|
||||||
GITHUB_HEAD_REF=
|
GITHUB_HEAD_REF=
|
||||||
GITHUB_JOB=test
|
GITHUB_JOB=event
|
||||||
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_c8594ff3-bed7-4fb7-b495-c63872db99a2
|
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_5705dc72-e111-46f1-9421-a77a2daec643
|
||||||
GITHUB_REF=refs/heads/master
|
GITHUB_REF=refs/heads/master
|
||||||
GITHUB_REF_NAME=master
|
GITHUB_REPOSITORY=crazy-max/test-docker-action
|
||||||
GITHUB_REF_PROTECTED=false
|
GITHUB_REPOSITORY_OWNER=crazy-max
|
||||||
GITHUB_REF_TYPE=branch
|
|
||||||
GITHUB_REPOSITORY=docker/test-docker-action
|
|
||||||
GITHUB_REPOSITORY_OWNER=docker
|
|
||||||
GITHUB_RETENTION_DAYS=90
|
GITHUB_RETENTION_DAYS=90
|
||||||
GITHUB_RUN_ATTEMPT=1
|
GITHUB_RUN_ID=325965155
|
||||||
GITHUB_RUN_ID=2188841209
|
GITHUB_RUN_NUMBER=3
|
||||||
GITHUB_RUN_NUMBER=24
|
|
||||||
GITHUB_SERVER_URL=https://github.com
|
GITHUB_SERVER_URL=https://github.com
|
||||||
GITHUB_SHA=860c1904a1ce19322e91ac35af1ab07466440c37
|
GITHUB_SHA=90dd6032fac8bda1b6c4436a2e65de27961ed071
|
||||||
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_c8594ff3-bed7-4fb7-b495-c63872db99a2
|
GITHUB_WORKFLOW=event
|
||||||
GITHUB_WORKFLOW=metadata
|
|
||||||
GITHUB_WORKSPACE=/home/runner/work/test-docker-action/test-docker-action
|
GITHUB_WORKSPACE=/home/runner/work/test-docker-action/test-docker-action
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"schedule": "*/10 * * * *"
|
|
||||||
}
|
|
@ -1,30 +0,0 @@
|
|||||||
GITHUB_ACTION=__crazy-max_ghaction-dump-context
|
|
||||||
GITHUB_ACTIONS=true
|
|
||||||
GITHUB_ACTION_PATH=/home/runner/work/_actions/crazy-max/ghaction-dump-context/v1
|
|
||||||
GITHUB_ACTION_REF=
|
|
||||||
GITHUB_ACTION_REPOSITORY=
|
|
||||||
GITHUB_ACTOR=crazy-max
|
|
||||||
GITHUB_API_URL=https://api.github.com
|
|
||||||
GITHUB_BASE_REF=
|
|
||||||
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_7703d3cb-84db-438f-9f97-46e159388a55
|
|
||||||
GITHUB_EVENT_NAME=push
|
|
||||||
#GITHUB_EVENT_PATH=./__tests__/fixtures/event_tag_1.0dev4.json
|
|
||||||
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
|
|
||||||
GITHUB_HEAD_REF=
|
|
||||||
GITHUB_JOB=test
|
|
||||||
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_7703d3cb-84db-438f-9f97-46e159388a55
|
|
||||||
GITHUB_REF=refs/tags/1.0dev4
|
|
||||||
GITHUB_REF_NAME=1.0dev4
|
|
||||||
GITHUB_REF_PROTECTED=false
|
|
||||||
GITHUB_REF_TYPE=tag
|
|
||||||
GITHUB_REPOSITORY=docker/test-docker-action
|
|
||||||
GITHUB_REPOSITORY_OWNER=docker
|
|
||||||
GITHUB_RETENTION_DAYS=90
|
|
||||||
GITHUB_RUN_ATTEMPT=1
|
|
||||||
GITHUB_RUN_ID=2188815933
|
|
||||||
GITHUB_RUN_NUMBER=21
|
|
||||||
GITHUB_SERVER_URL=https://github.com
|
|
||||||
GITHUB_SHA=860c1904a1ce19322e91ac35af1ab07466440c37
|
|
||||||
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_7703d3cb-84db-438f-9f97-46e159388a55
|
|
||||||
GITHUB_WORKFLOW=metadata
|
|
||||||
GITHUB_WORKSPACE=/home/runner/work/test-docker-action/test-docker-action
|
|
@ -1,30 +0,0 @@
|
|||||||
GITHUB_ACTION=__crazy-max_ghaction-dump-context
|
|
||||||
GITHUB_ACTIONS=true
|
|
||||||
GITHUB_ACTION_PATH=/home/runner/work/_actions/crazy-max/ghaction-dump-context/v1
|
|
||||||
GITHUB_ACTION_REF=
|
|
||||||
GITHUB_ACTION_REPOSITORY=
|
|
||||||
GITHUB_ACTOR=crazy-max
|
|
||||||
GITHUB_API_URL=https://api.github.com
|
|
||||||
GITHUB_BASE_REF=
|
|
||||||
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_7703d3cb-84db-438f-9f97-46e159388a55
|
|
||||||
GITHUB_EVENT_NAME=push
|
|
||||||
#GITHUB_EVENT_PATH=./__tests__/fixtures/event_tag_1.1beta2.json
|
|
||||||
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
|
|
||||||
GITHUB_HEAD_REF=
|
|
||||||
GITHUB_JOB=test
|
|
||||||
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_7703d3cb-84db-438f-9f97-46e159388a55
|
|
||||||
GITHUB_REF=refs/tags/1.1beta2
|
|
||||||
GITHUB_REF_NAME=1.1beta2
|
|
||||||
GITHUB_REF_PROTECTED=false
|
|
||||||
GITHUB_REF_TYPE=tag
|
|
||||||
GITHUB_REPOSITORY=docker/test-docker-action
|
|
||||||
GITHUB_REPOSITORY_OWNER=docker
|
|
||||||
GITHUB_RETENTION_DAYS=90
|
|
||||||
GITHUB_RUN_ATTEMPT=1
|
|
||||||
GITHUB_RUN_ID=2188815933
|
|
||||||
GITHUB_RUN_NUMBER=21
|
|
||||||
GITHUB_SERVER_URL=https://github.com
|
|
||||||
GITHUB_SHA=860c1904a1ce19322e91ac35af1ab07466440c37
|
|
||||||
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_7703d3cb-84db-438f-9f97-46e159388a55
|
|
||||||
GITHUB_WORKFLOW=metadata
|
|
||||||
GITHUB_WORKSPACE=/home/runner/work/test-docker-action/test-docker-action
|
|
@ -1,30 +0,0 @@
|
|||||||
GITHUB_ACTION=__crazy-max_ghaction-dump-context
|
|
||||||
GITHUB_ACTIONS=true
|
|
||||||
GITHUB_ACTION_PATH=/home/runner/work/_actions/crazy-max/ghaction-dump-context/v1
|
|
||||||
GITHUB_ACTION_REF=
|
|
||||||
GITHUB_ACTION_REPOSITORY=
|
|
||||||
GITHUB_ACTOR=crazy-max
|
|
||||||
GITHUB_API_URL=https://api.github.com
|
|
||||||
GITHUB_BASE_REF=
|
|
||||||
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_7703d3cb-84db-438f-9f97-46e159388a55
|
|
||||||
GITHUB_EVENT_NAME=push
|
|
||||||
#GITHUB_EVENT_PATH=./__tests__/fixtures/event_tag_1.2.3rc2.json
|
|
||||||
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
|
|
||||||
GITHUB_HEAD_REF=
|
|
||||||
GITHUB_JOB=test
|
|
||||||
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_7703d3cb-84db-438f-9f97-46e159388a55
|
|
||||||
GITHUB_REF=refs/tags/1.2.3rc2
|
|
||||||
GITHUB_REF_NAME=1.2.3rc2
|
|
||||||
GITHUB_REF_PROTECTED=false
|
|
||||||
GITHUB_REF_TYPE=tag
|
|
||||||
GITHUB_REPOSITORY=docker/test-docker-action
|
|
||||||
GITHUB_REPOSITORY_OWNER=docker
|
|
||||||
GITHUB_RETENTION_DAYS=90
|
|
||||||
GITHUB_RUN_ATTEMPT=1
|
|
||||||
GITHUB_RUN_ID=2188815933
|
|
||||||
GITHUB_RUN_NUMBER=21
|
|
||||||
GITHUB_SERVER_URL=https://github.com
|
|
||||||
GITHUB_SHA=860c1904a1ce19322e91ac35af1ab07466440c37
|
|
||||||
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_7703d3cb-84db-438f-9f97-46e159388a55
|
|
||||||
GITHUB_WORKFLOW=metadata
|
|
||||||
GITHUB_WORKSPACE=/home/runner/work/test-docker-action/test-docker-action
|
|
@ -1,30 +0,0 @@
|
|||||||
GITHUB_ACTION=__crazy-max_ghaction-dump-context
|
|
||||||
GITHUB_ACTIONS=true
|
|
||||||
GITHUB_ACTION_PATH=/home/runner/work/_actions/crazy-max/ghaction-dump-context/v1
|
|
||||||
GITHUB_ACTION_REF=
|
|
||||||
GITHUB_ACTION_REPOSITORY=
|
|
||||||
GITHUB_ACTOR=crazy-max
|
|
||||||
GITHUB_API_URL=https://api.github.com
|
|
||||||
GITHUB_BASE_REF=
|
|
||||||
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_7703d3cb-84db-438f-9f97-46e159388a55
|
|
||||||
GITHUB_EVENT_NAME=push
|
|
||||||
#GITHUB_EVENT_PATH=./__tests__/fixtures/event_tag_1.2.json
|
|
||||||
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
|
|
||||||
GITHUB_HEAD_REF=
|
|
||||||
GITHUB_JOB=test
|
|
||||||
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_7703d3cb-84db-438f-9f97-46e159388a55
|
|
||||||
GITHUB_REF=refs/tags/1.2
|
|
||||||
GITHUB_REF_NAME=1.2
|
|
||||||
GITHUB_REF_PROTECTED=false
|
|
||||||
GITHUB_REF_TYPE=tag
|
|
||||||
GITHUB_REPOSITORY=docker/test-docker-action
|
|
||||||
GITHUB_REPOSITORY_OWNER=docker
|
|
||||||
GITHUB_RETENTION_DAYS=90
|
|
||||||
GITHUB_RUN_ATTEMPT=1
|
|
||||||
GITHUB_RUN_ID=2188815933
|
|
||||||
GITHUB_RUN_NUMBER=21
|
|
||||||
GITHUB_SERVER_URL=https://github.com
|
|
||||||
GITHUB_SHA=860c1904a1ce19322e91ac35af1ab07466440c37
|
|
||||||
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_7703d3cb-84db-438f-9f97-46e159388a55
|
|
||||||
GITHUB_WORKFLOW=metadata
|
|
||||||
GITHUB_WORKSPACE=/home/runner/work/test-docker-action/test-docker-action
|
|
@ -1,30 +0,0 @@
|
|||||||
GITHUB_ACTION=__crazy-max_ghaction-dump-context
|
|
||||||
GITHUB_ACTIONS=true
|
|
||||||
GITHUB_ACTION_PATH=/home/runner/work/_actions/crazy-max/ghaction-dump-context/v1
|
|
||||||
GITHUB_ACTION_REF=
|
|
||||||
GITHUB_ACTION_REPOSITORY=
|
|
||||||
GITHUB_ACTOR=crazy-max
|
|
||||||
GITHUB_API_URL=https://api.github.com
|
|
||||||
GITHUB_BASE_REF=
|
|
||||||
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_7703d3cb-84db-438f-9f97-46e159388a55
|
|
||||||
GITHUB_EVENT_NAME=push
|
|
||||||
#GITHUB_EVENT_PATH=./__tests__/fixtures/event_tag_1.2post1.json
|
|
||||||
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
|
|
||||||
GITHUB_HEAD_REF=
|
|
||||||
GITHUB_JOB=test
|
|
||||||
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_7703d3cb-84db-438f-9f97-46e159388a55
|
|
||||||
GITHUB_REF=refs/tags/1.2post1
|
|
||||||
GITHUB_REF_NAME=1.2post1
|
|
||||||
GITHUB_REF_PROTECTED=false
|
|
||||||
GITHUB_REF_TYPE=tag
|
|
||||||
GITHUB_REPOSITORY=docker/test-docker-action
|
|
||||||
GITHUB_REPOSITORY_OWNER=docker
|
|
||||||
GITHUB_RETENTION_DAYS=90
|
|
||||||
GITHUB_RUN_ATTEMPT=1
|
|
||||||
GITHUB_RUN_ID=2188815933
|
|
||||||
GITHUB_RUN_NUMBER=21
|
|
||||||
GITHUB_SERVER_URL=https://github.com
|
|
||||||
GITHUB_SHA=860c1904a1ce19322e91ac35af1ab07466440c37
|
|
||||||
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_7703d3cb-84db-438f-9f97-46e159388a55
|
|
||||||
GITHUB_WORKFLOW=metadata
|
|
||||||
GITHUB_WORKSPACE=/home/runner/work/test-docker-action/test-docker-action
|
|
@ -1,30 +1,23 @@
|
|||||||
GITHUB_ACTION=__crazy-max_ghaction-dump-context
|
GITHUB_ACTION=crazy-maxghaction-dump-context
|
||||||
GITHUB_ACTIONS=true
|
GITHUB_ACTIONS=true
|
||||||
GITHUB_ACTION_PATH=/home/runner/work/_actions/crazy-max/ghaction-dump-context/v1
|
GITHUB_ACTION_PATH=/home/runner/work/_actions/crazy-max/ghaction-dump-context/v1
|
||||||
GITHUB_ACTION_REF=
|
|
||||||
GITHUB_ACTION_REPOSITORY=
|
|
||||||
GITHUB_ACTOR=crazy-max
|
GITHUB_ACTOR=crazy-max
|
||||||
GITHUB_API_URL=https://api.github.com
|
GITHUB_API_URL=https://api.github.com
|
||||||
GITHUB_BASE_REF=
|
GITHUB_BASE_REF=
|
||||||
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_7703d3cb-84db-438f-9f97-46e159388a55
|
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_6ee180c2-b331-434a-a867-89534cbefd83
|
||||||
GITHUB_EVENT_NAME=push
|
GITHUB_EVENT_NAME=push
|
||||||
#GITHUB_EVENT_PATH=./__tests__/fixtures/event_tag_20200110-RC2.json
|
#GITHUB_EVENT_PATH=/home/runner/work/_temp/_github_workflow/event.json
|
||||||
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
|
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
|
||||||
GITHUB_HEAD_REF=
|
GITHUB_HEAD_REF=
|
||||||
GITHUB_JOB=test
|
GITHUB_JOB=event
|
||||||
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_7703d3cb-84db-438f-9f97-46e159388a55
|
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_6ee180c2-b331-434a-a867-89534cbefd83
|
||||||
GITHUB_REF=refs/tags/20200110-RC2
|
GITHUB_REF=refs/tags/20200110-RC2
|
||||||
GITHUB_REF_NAME=20200110-RC2
|
GITHUB_REPOSITORY=crazy-max/test-docker-action
|
||||||
GITHUB_REF_PROTECTED=false
|
GITHUB_REPOSITORY_OWNER=crazy-max
|
||||||
GITHUB_REF_TYPE=tag
|
|
||||||
GITHUB_REPOSITORY=docker/test-docker-action
|
|
||||||
GITHUB_REPOSITORY_OWNER=docker
|
|
||||||
GITHUB_RETENTION_DAYS=90
|
GITHUB_RETENTION_DAYS=90
|
||||||
GITHUB_RUN_ATTEMPT=1
|
GITHUB_RUN_ID=325968230
|
||||||
GITHUB_RUN_ID=2188815933
|
GITHUB_RUN_NUMBER=4
|
||||||
GITHUB_RUN_NUMBER=21
|
|
||||||
GITHUB_SERVER_URL=https://github.com
|
GITHUB_SERVER_URL=https://github.com
|
||||||
GITHUB_SHA=860c1904a1ce19322e91ac35af1ab07466440c37
|
GITHUB_SHA=90dd6032fac8bda1b6c4436a2e65de27961ed071
|
||||||
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_7703d3cb-84db-438f-9f97-46e159388a55
|
GITHUB_WORKFLOW=event
|
||||||
GITHUB_WORKFLOW=metadata
|
|
||||||
GITHUB_WORKSPACE=/home/runner/work/test-docker-action/test-docker-action
|
GITHUB_WORKSPACE=/home/runner/work/test-docker-action/test-docker-action
|
||||||
|
@ -1,30 +0,0 @@
|
|||||||
GITHUB_ACTION=__crazy-max_ghaction-dump-context
|
|
||||||
GITHUB_ACTIONS=true
|
|
||||||
GITHUB_ACTION_PATH=/home/runner/work/_actions/crazy-max/ghaction-dump-context/v1
|
|
||||||
GITHUB_ACTION_REF=
|
|
||||||
GITHUB_ACTION_REPOSITORY=
|
|
||||||
GITHUB_ACTOR=crazy-max
|
|
||||||
GITHUB_API_URL=https://api.github.com
|
|
||||||
GITHUB_BASE_REF=
|
|
||||||
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_7703d3cb-84db-438f-9f97-46e159388a55
|
|
||||||
GITHUB_EVENT_NAME=push
|
|
||||||
#GITHUB_EVENT_PATH=./__tests__/fixtures/event_tag_p1-v1.0.0.json
|
|
||||||
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
|
|
||||||
GITHUB_HEAD_REF=
|
|
||||||
GITHUB_JOB=test
|
|
||||||
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_7703d3cb-84db-438f-9f97-46e159388a55
|
|
||||||
GITHUB_REF=refs/tags/p1/v1.0.0
|
|
||||||
GITHUB_REF_NAME=p1/v1.0.0
|
|
||||||
GITHUB_REF_PROTECTED=false
|
|
||||||
GITHUB_REF_TYPE=tag
|
|
||||||
GITHUB_REPOSITORY=docker/test-docker-action
|
|
||||||
GITHUB_REPOSITORY_OWNER=docker
|
|
||||||
GITHUB_RETENTION_DAYS=90
|
|
||||||
GITHUB_RUN_ATTEMPT=1
|
|
||||||
GITHUB_RUN_ID=2188815933
|
|
||||||
GITHUB_RUN_NUMBER=21
|
|
||||||
GITHUB_SERVER_URL=https://github.com
|
|
||||||
GITHUB_SHA=860c1904a1ce19322e91ac35af1ab07466440c37
|
|
||||||
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_7703d3cb-84db-438f-9f97-46e159388a55
|
|
||||||
GITHUB_WORKFLOW=metadata
|
|
||||||
GITHUB_WORKSPACE=/home/runner/work/test-docker-action/test-docker-action
|
|
@ -1,30 +1,23 @@
|
|||||||
GITHUB_ACTION=__crazy-max_ghaction-dump-context
|
GITHUB_ACTION=crazy-maxghaction-dump-context
|
||||||
GITHUB_ACTIONS=true
|
GITHUB_ACTIONS=true
|
||||||
GITHUB_ACTION_PATH=/home/runner/work/_actions/crazy-max/ghaction-dump-context/v1
|
GITHUB_ACTION_PATH=/home/runner/work/_actions/crazy-max/ghaction-dump-context/v1
|
||||||
GITHUB_ACTION_REF=
|
|
||||||
GITHUB_ACTION_REPOSITORY=
|
|
||||||
GITHUB_ACTOR=crazy-max
|
GITHUB_ACTOR=crazy-max
|
||||||
GITHUB_API_URL=https://api.github.com
|
GITHUB_API_URL=https://api.github.com
|
||||||
GITHUB_BASE_REF=
|
GITHUB_BASE_REF=
|
||||||
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_7703d3cb-84db-438f-9f97-46e159388a55
|
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_6ee180c2-b331-434a-a867-89534cbefd83
|
||||||
GITHUB_EVENT_NAME=push
|
GITHUB_EVENT_NAME=push
|
||||||
#GITHUB_EVENT_PATH=./__tests__/fixtures/event_tag_release1.json
|
#GITHUB_EVENT_PATH=/home/runner/work/_temp/_github_workflow/event.json
|
||||||
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
|
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
|
||||||
GITHUB_HEAD_REF=
|
GITHUB_HEAD_REF=
|
||||||
GITHUB_JOB=test
|
GITHUB_JOB=event
|
||||||
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_7703d3cb-84db-438f-9f97-46e159388a55
|
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_6ee180c2-b331-434a-a867-89534cbefd83
|
||||||
GITHUB_REF=refs/tags/release1
|
GITHUB_REF=refs/tags/release1
|
||||||
GITHUB_REF_NAME=release1
|
GITHUB_REPOSITORY=crazy-max/test-docker-action
|
||||||
GITHUB_REF_PROTECTED=false
|
GITHUB_REPOSITORY_OWNER=crazy-max
|
||||||
GITHUB_REF_TYPE=tag
|
|
||||||
GITHUB_REPOSITORY=docker/test-docker-action
|
|
||||||
GITHUB_REPOSITORY_OWNER=docker
|
|
||||||
GITHUB_RETENTION_DAYS=90
|
GITHUB_RETENTION_DAYS=90
|
||||||
GITHUB_RUN_ATTEMPT=1
|
GITHUB_RUN_ID=325968230
|
||||||
GITHUB_RUN_ID=2188815933
|
GITHUB_RUN_NUMBER=4
|
||||||
GITHUB_RUN_NUMBER=21
|
|
||||||
GITHUB_SERVER_URL=https://github.com
|
GITHUB_SERVER_URL=https://github.com
|
||||||
GITHUB_SHA=860c1904a1ce19322e91ac35af1ab07466440c37
|
GITHUB_SHA=90dd6032fac8bda1b6c4436a2e65de27961ed071
|
||||||
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_7703d3cb-84db-438f-9f97-46e159388a55
|
GITHUB_WORKFLOW=event
|
||||||
GITHUB_WORKFLOW=metadata
|
|
||||||
GITHUB_WORKSPACE=/home/runner/work/test-docker-action/test-docker-action
|
GITHUB_WORKSPACE=/home/runner/work/test-docker-action/test-docker-action
|
||||||
|
@ -1,30 +1,23 @@
|
|||||||
GITHUB_ACTION=__crazy-max_ghaction-dump-context
|
GITHUB_ACTION=crazy-maxghaction-dump-context
|
||||||
GITHUB_ACTIONS=true
|
GITHUB_ACTIONS=true
|
||||||
GITHUB_ACTION_PATH=/home/runner/work/_actions/crazy-max/ghaction-dump-context/v1
|
GITHUB_ACTION_PATH=/home/runner/work/_actions/crazy-max/ghaction-dump-context/v1
|
||||||
GITHUB_ACTION_REF=
|
|
||||||
GITHUB_ACTION_REPOSITORY=
|
|
||||||
GITHUB_ACTOR=crazy-max
|
GITHUB_ACTOR=crazy-max
|
||||||
GITHUB_API_URL=https://api.github.com
|
GITHUB_API_URL=https://api.github.com
|
||||||
GITHUB_BASE_REF=
|
GITHUB_BASE_REF=
|
||||||
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_7703d3cb-84db-438f-9f97-46e159388a55
|
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_6ee180c2-b331-434a-a867-89534cbefd83
|
||||||
GITHUB_EVENT_NAME=push
|
GITHUB_EVENT_NAME=push
|
||||||
#GITHUB_EVENT_PATH=./__tests__/fixtures/event_tag_sometag.json
|
#GITHUB_EVENT_PATH=/home/runner/work/_temp/_github_workflow/event.json
|
||||||
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
|
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
|
||||||
GITHUB_HEAD_REF=
|
GITHUB_HEAD_REF=
|
||||||
GITHUB_JOB=test
|
GITHUB_JOB=event
|
||||||
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_7703d3cb-84db-438f-9f97-46e159388a55
|
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_6ee180c2-b331-434a-a867-89534cbefd83
|
||||||
GITHUB_REF=refs/tags/sometag
|
GITHUB_REF=refs/tags/sometag
|
||||||
GITHUB_REF_NAME=sometag
|
GITHUB_REPOSITORY=crazy-max/test-docker-action
|
||||||
GITHUB_REF_PROTECTED=false
|
GITHUB_REPOSITORY_OWNER=crazy-max
|
||||||
GITHUB_REF_TYPE=tag
|
|
||||||
GITHUB_REPOSITORY=docker/test-docker-action
|
|
||||||
GITHUB_REPOSITORY_OWNER=docker
|
|
||||||
GITHUB_RETENTION_DAYS=90
|
GITHUB_RETENTION_DAYS=90
|
||||||
GITHUB_RUN_ATTEMPT=1
|
GITHUB_RUN_ID=325968230
|
||||||
GITHUB_RUN_ID=2188815933
|
GITHUB_RUN_NUMBER=4
|
||||||
GITHUB_RUN_NUMBER=21
|
|
||||||
GITHUB_SERVER_URL=https://github.com
|
GITHUB_SERVER_URL=https://github.com
|
||||||
GITHUB_SHA=860c1904a1ce19322e91ac35af1ab07466440c37
|
GITHUB_SHA=90dd6032fac8bda1b6c4436a2e65de27961ed071
|
||||||
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_7703d3cb-84db-438f-9f97-46e159388a55
|
GITHUB_WORKFLOW=event
|
||||||
GITHUB_WORKFLOW=metadata
|
|
||||||
GITHUB_WORKSPACE=/home/runner/work/test-docker-action/test-docker-action
|
GITHUB_WORKSPACE=/home/runner/work/test-docker-action/test-docker-action
|
||||||
|
@ -1,30 +1,23 @@
|
|||||||
GITHUB_ACTION=__crazy-max_ghaction-dump-context
|
GITHUB_ACTION=crazy-maxghaction-dump-context
|
||||||
GITHUB_ACTIONS=true
|
GITHUB_ACTIONS=true
|
||||||
GITHUB_ACTION_PATH=/home/runner/work/_actions/crazy-max/ghaction-dump-context/v1
|
GITHUB_ACTION_PATH=/home/runner/work/_actions/crazy-max/ghaction-dump-context/v1
|
||||||
GITHUB_ACTION_REF=
|
|
||||||
GITHUB_ACTION_REPOSITORY=
|
|
||||||
GITHUB_ACTOR=crazy-max
|
GITHUB_ACTOR=crazy-max
|
||||||
GITHUB_API_URL=https://api.github.com
|
GITHUB_API_URL=https://api.github.com
|
||||||
GITHUB_BASE_REF=
|
GITHUB_BASE_REF=
|
||||||
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_7703d3cb-84db-438f-9f97-46e159388a55
|
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_6ee180c2-b331-434a-a867-89534cbefd83
|
||||||
GITHUB_EVENT_NAME=push
|
GITHUB_EVENT_NAME=push
|
||||||
GITHUB_EVENT_PATH=./__tests__/fixtures/event_tag_v1.1.1.json
|
#GITHUB_EVENT_PATH=/home/runner/work/_temp/_github_workflow/event.json
|
||||||
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
|
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
|
||||||
GITHUB_HEAD_REF=
|
GITHUB_HEAD_REF=
|
||||||
GITHUB_JOB=test
|
GITHUB_JOB=event
|
||||||
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_7703d3cb-84db-438f-9f97-46e159388a55
|
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_6ee180c2-b331-434a-a867-89534cbefd83
|
||||||
GITHUB_REF=refs/tags/v1.1.1
|
GITHUB_REF=refs/tags/v1.1.1
|
||||||
GITHUB_REF_NAME=v1.1.1
|
GITHUB_REPOSITORY=crazy-max/test-docker-action
|
||||||
GITHUB_REF_PROTECTED=false
|
GITHUB_REPOSITORY_OWNER=crazy-max
|
||||||
GITHUB_REF_TYPE=tag
|
|
||||||
GITHUB_REPOSITORY=docker/test-docker-action
|
|
||||||
GITHUB_REPOSITORY_OWNER=docker
|
|
||||||
GITHUB_RETENTION_DAYS=90
|
GITHUB_RETENTION_DAYS=90
|
||||||
GITHUB_RUN_ATTEMPT=1
|
GITHUB_RUN_ID=325968230
|
||||||
GITHUB_RUN_ID=2188815933
|
GITHUB_RUN_NUMBER=4
|
||||||
GITHUB_RUN_NUMBER=21
|
|
||||||
GITHUB_SERVER_URL=https://github.com
|
GITHUB_SERVER_URL=https://github.com
|
||||||
GITHUB_SHA=860c1904a1ce19322e91ac35af1ab07466440c37
|
GITHUB_SHA=90dd6032fac8bda1b6c4436a2e65de27961ed071
|
||||||
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_7703d3cb-84db-438f-9f97-46e159388a55
|
GITHUB_WORKFLOW=event
|
||||||
GITHUB_WORKFLOW=metadata
|
|
||||||
GITHUB_WORKSPACE=/home/runner/work/test-docker-action/test-docker-action
|
GITHUB_WORKSPACE=/home/runner/work/test-docker-action/test-docker-action
|
||||||
|
@ -1,176 +0,0 @@
|
|||||||
{
|
|
||||||
"after": "860c1904a1ce19322e91ac35af1ab07466440c37",
|
|
||||||
"base_ref": "refs/heads/master",
|
|
||||||
"before": "0000000000000000000000000000000000000000",
|
|
||||||
"commits": [],
|
|
||||||
"compare": "https://github.com/docker/test-docker-action/compare/v1.1.1",
|
|
||||||
"created": true,
|
|
||||||
"deleted": false,
|
|
||||||
"forced": false,
|
|
||||||
"head_commit": {
|
|
||||||
"author": {
|
|
||||||
"email": "crazy-max@users.noreply.github.com",
|
|
||||||
"name": "CrazyMax",
|
|
||||||
"username": "crazy-max"
|
|
||||||
},
|
|
||||||
"committer": {
|
|
||||||
"email": "crazy-max@users.noreply.github.com",
|
|
||||||
"name": "CrazyMax",
|
|
||||||
"username": "crazy-max"
|
|
||||||
},
|
|
||||||
"distinct": true,
|
|
||||||
"id": "860c1904a1ce19322e91ac35af1ab07466440c37",
|
|
||||||
"message": "scheduled",
|
|
||||||
"timestamp": "2022-04-19T11:39:35+02:00",
|
|
||||||
"tree_id": "1d3608c3f204a4d754a1db925264929afd54daad",
|
|
||||||
"url": "https://github.com/docker/test-docker-action/commit/860c1904a1ce19322e91ac35af1ab07466440c37"
|
|
||||||
},
|
|
||||||
"organization": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/5429470?v=4",
|
|
||||||
"description": "Docker helps developers bring their ideas to life by conquering the complexity of app development.",
|
|
||||||
"events_url": "https://api.github.com/orgs/docker/events",
|
|
||||||
"hooks_url": "https://api.github.com/orgs/docker/hooks",
|
|
||||||
"id": 5429470,
|
|
||||||
"issues_url": "https://api.github.com/orgs/docker/issues",
|
|
||||||
"login": "docker",
|
|
||||||
"members_url": "https://api.github.com/orgs/docker/members{/member}",
|
|
||||||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjU0Mjk0NzA=",
|
|
||||||
"public_members_url": "https://api.github.com/orgs/docker/public_members{/member}",
|
|
||||||
"repos_url": "https://api.github.com/orgs/docker/repos",
|
|
||||||
"url": "https://api.github.com/orgs/docker"
|
|
||||||
},
|
|
||||||
"pusher": {
|
|
||||||
"email": "github@crazymax.dev",
|
|
||||||
"name": "crazy-max"
|
|
||||||
},
|
|
||||||
"ref": "refs/tags/v1.1.1",
|
|
||||||
"repository": {
|
|
||||||
"allow_forking": true,
|
|
||||||
"archive_url": "https://api.github.com/repos/docker/test-docker-action/{archive_format}{/ref}",
|
|
||||||
"archived": false,
|
|
||||||
"assignees_url": "https://api.github.com/repos/docker/test-docker-action/assignees{/user}",
|
|
||||||
"blobs_url": "https://api.github.com/repos/docker/test-docker-action/git/blobs{/sha}",
|
|
||||||
"branches_url": "https://api.github.com/repos/docker/test-docker-action/branches{/branch}",
|
|
||||||
"clone_url": "https://github.com/docker/test-docker-action.git",
|
|
||||||
"collaborators_url": "https://api.github.com/repos/docker/test-docker-action/collaborators{/collaborator}",
|
|
||||||
"comments_url": "https://api.github.com/repos/docker/test-docker-action/comments{/number}",
|
|
||||||
"commits_url": "https://api.github.com/repos/docker/test-docker-action/commits{/sha}",
|
|
||||||
"compare_url": "https://api.github.com/repos/docker/test-docker-action/compare/{base}...{head}",
|
|
||||||
"contents_url": "https://api.github.com/repos/docker/test-docker-action/contents/{+path}",
|
|
||||||
"contributors_url": "https://api.github.com/repos/docker/test-docker-action/contributors",
|
|
||||||
"created_at": 1596792180,
|
|
||||||
"default_branch": "master",
|
|
||||||
"deployments_url": "https://api.github.com/repos/docker/test-docker-action/deployments",
|
|
||||||
"description": "Test \"Docker\" Actions",
|
|
||||||
"disabled": false,
|
|
||||||
"downloads_url": "https://api.github.com/repos/docker/test-docker-action/downloads",
|
|
||||||
"events_url": "https://api.github.com/repos/docker/test-docker-action/events",
|
|
||||||
"fork": false,
|
|
||||||
"forks": 1,
|
|
||||||
"forks_count": 1,
|
|
||||||
"forks_url": "https://api.github.com/repos/docker/test-docker-action/forks",
|
|
||||||
"full_name": "docker/test-docker-action",
|
|
||||||
"git_commits_url": "https://api.github.com/repos/docker/test-docker-action/git/commits{/sha}",
|
|
||||||
"git_refs_url": "https://api.github.com/repos/docker/test-docker-action/git/refs{/sha}",
|
|
||||||
"git_tags_url": "https://api.github.com/repos/docker/test-docker-action/git/tags{/sha}",
|
|
||||||
"git_url": "git://github.com/docker/test-docker-action.git",
|
|
||||||
"has_downloads": true,
|
|
||||||
"has_issues": true,
|
|
||||||
"has_pages": false,
|
|
||||||
"has_projects": true,
|
|
||||||
"has_wiki": true,
|
|
||||||
"homepage": "",
|
|
||||||
"hooks_url": "https://api.github.com/repos/docker/test-docker-action/hooks",
|
|
||||||
"html_url": "https://github.com/docker/test-docker-action",
|
|
||||||
"id": 285789493,
|
|
||||||
"is_template": false,
|
|
||||||
"issue_comment_url": "https://api.github.com/repos/docker/test-docker-action/issues/comments{/number}",
|
|
||||||
"issue_events_url": "https://api.github.com/repos/docker/test-docker-action/issues/events{/number}",
|
|
||||||
"issues_url": "https://api.github.com/repos/docker/test-docker-action/issues{/number}",
|
|
||||||
"keys_url": "https://api.github.com/repos/docker/test-docker-action/keys{/key_id}",
|
|
||||||
"labels_url": "https://api.github.com/repos/docker/test-docker-action/labels{/name}",
|
|
||||||
"language": "JavaScript",
|
|
||||||
"languages_url": "https://api.github.com/repos/docker/test-docker-action/languages",
|
|
||||||
"license": {
|
|
||||||
"key": "mit",
|
|
||||||
"name": "MIT License",
|
|
||||||
"node_id": "MDc6TGljZW5zZTEz",
|
|
||||||
"spdx_id": "MIT",
|
|
||||||
"url": "https://api.github.com/licenses/mit"
|
|
||||||
},
|
|
||||||
"master_branch": "master",
|
|
||||||
"merges_url": "https://api.github.com/repos/docker/test-docker-action/merges",
|
|
||||||
"milestones_url": "https://api.github.com/repos/docker/test-docker-action/milestones{/number}",
|
|
||||||
"mirror_url": null,
|
|
||||||
"name": "test-docker-action",
|
|
||||||
"node_id": "MDEwOlJlcG9zaXRvcnkyODU3ODk0OTM=",
|
|
||||||
"notifications_url": "https://api.github.com/repos/docker/test-docker-action/notifications{?since,all,participating}",
|
|
||||||
"open_issues": 6,
|
|
||||||
"open_issues_count": 6,
|
|
||||||
"organization": "docker",
|
|
||||||
"owner": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/5429470?v=4",
|
|
||||||
"email": "info@docker.com",
|
|
||||||
"events_url": "https://api.github.com/users/docker/events{/privacy}",
|
|
||||||
"followers_url": "https://api.github.com/users/docker/followers",
|
|
||||||
"following_url": "https://api.github.com/users/docker/following{/other_user}",
|
|
||||||
"gists_url": "https://api.github.com/users/docker/gists{/gist_id}",
|
|
||||||
"gravatar_id": "",
|
|
||||||
"html_url": "https://github.com/docker",
|
|
||||||
"id": 5429470,
|
|
||||||
"login": "docker",
|
|
||||||
"name": "docker",
|
|
||||||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjU0Mjk0NzA=",
|
|
||||||
"organizations_url": "https://api.github.com/users/docker/orgs",
|
|
||||||
"received_events_url": "https://api.github.com/users/docker/received_events",
|
|
||||||
"repos_url": "https://api.github.com/users/docker/repos",
|
|
||||||
"site_admin": false,
|
|
||||||
"starred_url": "https://api.github.com/users/docker/starred{/owner}{/repo}",
|
|
||||||
"subscriptions_url": "https://api.github.com/users/docker/subscriptions",
|
|
||||||
"type": "Organization",
|
|
||||||
"url": "https://api.github.com/users/docker"
|
|
||||||
},
|
|
||||||
"private": true,
|
|
||||||
"pulls_url": "https://api.github.com/repos/docker/test-docker-action/pulls{/number}",
|
|
||||||
"pushed_at": 1650361263,
|
|
||||||
"releases_url": "https://api.github.com/repos/docker/test-docker-action/releases{/id}",
|
|
||||||
"size": 796,
|
|
||||||
"ssh_url": "git@github.com:docker/test-docker-action.git",
|
|
||||||
"stargazers": 0,
|
|
||||||
"stargazers_count": 0,
|
|
||||||
"stargazers_url": "https://api.github.com/repos/docker/test-docker-action/stargazers",
|
|
||||||
"statuses_url": "https://api.github.com/repos/docker/test-docker-action/statuses/{sha}",
|
|
||||||
"subscribers_url": "https://api.github.com/repos/docker/test-docker-action/subscribers",
|
|
||||||
"subscription_url": "https://api.github.com/repos/docker/test-docker-action/subscription",
|
|
||||||
"svn_url": "https://github.com/docker/test-docker-action",
|
|
||||||
"tags_url": "https://api.github.com/repos/docker/test-docker-action/tags",
|
|
||||||
"teams_url": "https://api.github.com/repos/docker/test-docker-action/teams",
|
|
||||||
"topics": [],
|
|
||||||
"trees_url": "https://api.github.com/repos/docker/test-docker-action/git/trees{/sha}",
|
|
||||||
"updated_at": "2022-04-19T09:05:09Z",
|
|
||||||
"url": "https://github.com/docker/test-docker-action",
|
|
||||||
"visibility": "private",
|
|
||||||
"watchers": 0,
|
|
||||||
"watchers_count": 0
|
|
||||||
},
|
|
||||||
"sender": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/1951866?v=4",
|
|
||||||
"events_url": "https://api.github.com/users/crazy-max/events{/privacy}",
|
|
||||||
"followers_url": "https://api.github.com/users/crazy-max/followers",
|
|
||||||
"following_url": "https://api.github.com/users/crazy-max/following{/other_user}",
|
|
||||||
"gists_url": "https://api.github.com/users/crazy-max/gists{/gist_id}",
|
|
||||||
"gravatar_id": "",
|
|
||||||
"html_url": "https://github.com/crazy-max",
|
|
||||||
"id": 1951866,
|
|
||||||
"login": "crazy-max",
|
|
||||||
"node_id": "MDQ6VXNlcjE5NTE4NjY=",
|
|
||||||
"organizations_url": "https://api.github.com/users/crazy-max/orgs",
|
|
||||||
"received_events_url": "https://api.github.com/users/crazy-max/received_events",
|
|
||||||
"repos_url": "https://api.github.com/users/crazy-max/repos",
|
|
||||||
"site_admin": false,
|
|
||||||
"starred_url": "https://api.github.com/users/crazy-max/starred{/owner}{/repo}",
|
|
||||||
"subscriptions_url": "https://api.github.com/users/crazy-max/subscriptions",
|
|
||||||
"type": "User",
|
|
||||||
"url": "https://api.github.com/users/crazy-max"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,30 +0,0 @@
|
|||||||
GITHUB_ACTION=__crazy-max_ghaction-dump-context
|
|
||||||
GITHUB_ACTIONS=true
|
|
||||||
GITHUB_ACTION_PATH=/home/runner/work/_actions/crazy-max/ghaction-dump-context/v1
|
|
||||||
GITHUB_ACTION_REF=
|
|
||||||
GITHUB_ACTION_REPOSITORY=
|
|
||||||
GITHUB_ACTOR=crazy-max
|
|
||||||
GITHUB_API_URL=https://api.github.com
|
|
||||||
GITHUB_BASE_REF=
|
|
||||||
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_7703d3cb-84db-438f-9f97-46e159388a55
|
|
||||||
GITHUB_EVENT_NAME=push
|
|
||||||
#GITHUB_EVENT_PATH=./__tests__/fixtures/event_tag_v1.2.3rc2.json
|
|
||||||
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
|
|
||||||
GITHUB_HEAD_REF=
|
|
||||||
GITHUB_JOB=test
|
|
||||||
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_7703d3cb-84db-438f-9f97-46e159388a55
|
|
||||||
GITHUB_REF=refs/tags/v1.2.3rc2
|
|
||||||
GITHUB_REF_NAME=v1.2.3rc2
|
|
||||||
GITHUB_REF_PROTECTED=false
|
|
||||||
GITHUB_REF_TYPE=tag
|
|
||||||
GITHUB_REPOSITORY=docker/test-docker-action
|
|
||||||
GITHUB_REPOSITORY_OWNER=docker
|
|
||||||
GITHUB_RETENTION_DAYS=90
|
|
||||||
GITHUB_RUN_ATTEMPT=1
|
|
||||||
GITHUB_RUN_ID=2188815933
|
|
||||||
GITHUB_RUN_NUMBER=21
|
|
||||||
GITHUB_SERVER_URL=https://github.com
|
|
||||||
GITHUB_SHA=860c1904a1ce19322e91ac35af1ab07466440c37
|
|
||||||
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_7703d3cb-84db-438f-9f97-46e159388a55
|
|
||||||
GITHUB_WORKFLOW=metadata
|
|
||||||
GITHUB_WORKSPACE=/home/runner/work/test-docker-action/test-docker-action
|
|
@ -1,30 +1,23 @@
|
|||||||
GITHUB_ACTION=__crazy-max_ghaction-dump-context
|
GITHUB_ACTION=crazy-maxghaction-dump-context
|
||||||
GITHUB_ACTIONS=true
|
GITHUB_ACTIONS=true
|
||||||
GITHUB_ACTION_PATH=/home/runner/work/_actions/crazy-max/ghaction-dump-context/v1
|
GITHUB_ACTION_PATH=/home/runner/work/_actions/crazy-max/ghaction-dump-context/v1
|
||||||
GITHUB_ACTION_REF=
|
|
||||||
GITHUB_ACTION_REPOSITORY=
|
|
||||||
GITHUB_ACTOR=crazy-max
|
GITHUB_ACTOR=crazy-max
|
||||||
GITHUB_API_URL=https://api.github.com
|
GITHUB_API_URL=https://api.github.com
|
||||||
GITHUB_BASE_REF=
|
GITHUB_BASE_REF=
|
||||||
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_7703d3cb-84db-438f-9f97-46e159388a55
|
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_6ee180c2-b331-434a-a867-89534cbefd83
|
||||||
GITHUB_EVENT_NAME=push
|
GITHUB_EVENT_NAME=push
|
||||||
#GITHUB_EVENT_PATH=./__tests__/fixtures/event_tag_v2.0.8-beta.67.json
|
#GITHUB_EVENT_PATH=/home/runner/work/_temp/_github_workflow/event.json
|
||||||
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
|
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
|
||||||
GITHUB_HEAD_REF=
|
GITHUB_HEAD_REF=
|
||||||
GITHUB_JOB=test
|
GITHUB_JOB=event
|
||||||
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_7703d3cb-84db-438f-9f97-46e159388a55
|
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_6ee180c2-b331-434a-a867-89534cbefd83
|
||||||
GITHUB_REF=refs/tags/v2.0.8-beta.67
|
GITHUB_REF=refs/tags/v2.0.8-beta.67
|
||||||
GITHUB_REF_NAME=v2.0.8-beta.67
|
GITHUB_REPOSITORY=crazy-max/test-docker-action
|
||||||
GITHUB_REF_PROTECTED=false
|
GITHUB_REPOSITORY_OWNER=crazy-max
|
||||||
GITHUB_REF_TYPE=tag
|
|
||||||
GITHUB_REPOSITORY=docker/test-docker-action
|
|
||||||
GITHUB_REPOSITORY_OWNER=docker
|
|
||||||
GITHUB_RETENTION_DAYS=90
|
GITHUB_RETENTION_DAYS=90
|
||||||
GITHUB_RUN_ATTEMPT=1
|
GITHUB_RUN_ID=325968230
|
||||||
GITHUB_RUN_ID=2188815933
|
GITHUB_RUN_NUMBER=4
|
||||||
GITHUB_RUN_NUMBER=21
|
|
||||||
GITHUB_SERVER_URL=https://github.com
|
GITHUB_SERVER_URL=https://github.com
|
||||||
GITHUB_SHA=860c1904a1ce19322e91ac35af1ab07466440c37
|
GITHUB_SHA=90dd6032fac8bda1b6c4436a2e65de27961ed071
|
||||||
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_7703d3cb-84db-438f-9f97-46e159388a55
|
GITHUB_WORKFLOW=event
|
||||||
GITHUB_WORKFLOW=metadata
|
|
||||||
GITHUB_WORKSPACE=/home/runner/work/test-docker-action/test-docker-action
|
GITHUB_WORKSPACE=/home/runner/work/test-docker-action/test-docker-action
|
||||||
|
@ -1,30 +1,23 @@
|
|||||||
GITHUB_ACTION=__crazy-max_ghaction-dump-context
|
GITHUB_ACTION=crazy-maxghaction-dump-context
|
||||||
GITHUB_ACTIONS=true
|
GITHUB_ACTIONS=true
|
||||||
GITHUB_ACTION_PATH=/home/runner/work/_actions/crazy-max/ghaction-dump-context/v1
|
GITHUB_ACTION_PATH=/home/runner/work/_actions/crazy-max/ghaction-dump-context/v1
|
||||||
GITHUB_ACTION_REF=
|
|
||||||
GITHUB_ACTION_REPOSITORY=
|
|
||||||
GITHUB_ACTOR=crazy-max
|
GITHUB_ACTOR=crazy-max
|
||||||
GITHUB_API_URL=https://api.github.com
|
GITHUB_API_URL=https://api.github.com
|
||||||
GITHUB_BASE_REF=
|
GITHUB_BASE_REF=
|
||||||
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_397d8f76-d5a2-478b-94ec-cadbffd1c08e
|
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_4c49cda0-764d-4055-9bd9-7caf67fcb10c
|
||||||
GITHUB_EVENT_NAME=workflow_dispatch
|
GITHUB_EVENT_NAME=workflow_dispatch
|
||||||
GITHUB_EVENT_PATH=./__tests__/fixtures/event_workflow_dispatch.json
|
#GITHUB_EVENT_PATH=/home/runner/work/_temp/_github_workflow/event.json
|
||||||
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
|
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
|
||||||
GITHUB_HEAD_REF=
|
GITHUB_HEAD_REF=
|
||||||
GITHUB_JOB=test
|
GITHUB_JOB=event
|
||||||
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_397d8f76-d5a2-478b-94ec-cadbffd1c08e
|
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_4c49cda0-764d-4055-9bd9-7caf67fcb10c
|
||||||
GITHUB_REF=refs/heads/master
|
GITHUB_REF=refs/heads/master
|
||||||
GITHUB_REF_NAME=master
|
GITHUB_REPOSITORY=crazy-max/test-docker-action
|
||||||
GITHUB_REF_PROTECTED=false
|
GITHUB_REPOSITORY_OWNER=crazy-max
|
||||||
GITHUB_REF_TYPE=branch
|
|
||||||
GITHUB_REPOSITORY=docker/test-docker-action
|
|
||||||
GITHUB_REPOSITORY_OWNER=docker
|
|
||||||
GITHUB_RETENTION_DAYS=90
|
GITHUB_RETENTION_DAYS=90
|
||||||
GITHUB_RUN_ATTEMPT=1
|
GITHUB_RUN_ID=325962325
|
||||||
GITHUB_RUN_ID=2188839914
|
GITHUB_RUN_NUMBER=2
|
||||||
GITHUB_RUN_NUMBER=23
|
|
||||||
GITHUB_SERVER_URL=https://github.com
|
GITHUB_SERVER_URL=https://github.com
|
||||||
GITHUB_SHA=860c1904a1ce19322e91ac35af1ab07466440c37
|
GITHUB_SHA=90dd6032fac8bda1b6c4436a2e65de27961ed071
|
||||||
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_397d8f76-d5a2-478b-94ec-cadbffd1c08e
|
GITHUB_WORKFLOW=event
|
||||||
GITHUB_WORKFLOW=metadata
|
|
||||||
GITHUB_WORKSPACE=/home/runner/work/test-docker-action/test-docker-action
|
GITHUB_WORKSPACE=/home/runner/work/test-docker-action/test-docker-action
|
||||||
|
@ -1,145 +0,0 @@
|
|||||||
{
|
|
||||||
"inputs": {
|
|
||||||
"logLevel": "warning"
|
|
||||||
},
|
|
||||||
"organization": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/5429470?v=4",
|
|
||||||
"description": "Docker helps developers bring their ideas to life by conquering the complexity of app development.",
|
|
||||||
"events_url": "https://api.github.com/orgs/docker/events",
|
|
||||||
"hooks_url": "https://api.github.com/orgs/docker/hooks",
|
|
||||||
"id": 5429470,
|
|
||||||
"issues_url": "https://api.github.com/orgs/docker/issues",
|
|
||||||
"login": "docker",
|
|
||||||
"members_url": "https://api.github.com/orgs/docker/members{/member}",
|
|
||||||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjU0Mjk0NzA=",
|
|
||||||
"public_members_url": "https://api.github.com/orgs/docker/public_members{/member}",
|
|
||||||
"repos_url": "https://api.github.com/orgs/docker/repos",
|
|
||||||
"url": "https://api.github.com/orgs/docker"
|
|
||||||
},
|
|
||||||
"ref": "refs/heads/master",
|
|
||||||
"repository": {
|
|
||||||
"allow_forking": true,
|
|
||||||
"archive_url": "https://api.github.com/repos/docker/test-docker-action/{archive_format}{/ref}",
|
|
||||||
"archived": false,
|
|
||||||
"assignees_url": "https://api.github.com/repos/docker/test-docker-action/assignees{/user}",
|
|
||||||
"blobs_url": "https://api.github.com/repos/docker/test-docker-action/git/blobs{/sha}",
|
|
||||||
"branches_url": "https://api.github.com/repos/docker/test-docker-action/branches{/branch}",
|
|
||||||
"clone_url": "https://github.com/docker/test-docker-action.git",
|
|
||||||
"collaborators_url": "https://api.github.com/repos/docker/test-docker-action/collaborators{/collaborator}",
|
|
||||||
"comments_url": "https://api.github.com/repos/docker/test-docker-action/comments{/number}",
|
|
||||||
"commits_url": "https://api.github.com/repos/docker/test-docker-action/commits{/sha}",
|
|
||||||
"compare_url": "https://api.github.com/repos/docker/test-docker-action/compare/{base}...{head}",
|
|
||||||
"contents_url": "https://api.github.com/repos/docker/test-docker-action/contents/{+path}",
|
|
||||||
"contributors_url": "https://api.github.com/repos/docker/test-docker-action/contributors",
|
|
||||||
"created_at": "2020-08-07T09:23:00Z",
|
|
||||||
"default_branch": "master",
|
|
||||||
"deployments_url": "https://api.github.com/repos/docker/test-docker-action/deployments",
|
|
||||||
"description": "Test \"Docker\" Actions",
|
|
||||||
"disabled": false,
|
|
||||||
"downloads_url": "https://api.github.com/repos/docker/test-docker-action/downloads",
|
|
||||||
"events_url": "https://api.github.com/repos/docker/test-docker-action/events",
|
|
||||||
"fork": false,
|
|
||||||
"forks": 1,
|
|
||||||
"forks_count": 1,
|
|
||||||
"forks_url": "https://api.github.com/repos/docker/test-docker-action/forks",
|
|
||||||
"full_name": "docker/test-docker-action",
|
|
||||||
"git_commits_url": "https://api.github.com/repos/docker/test-docker-action/git/commits{/sha}",
|
|
||||||
"git_refs_url": "https://api.github.com/repos/docker/test-docker-action/git/refs{/sha}",
|
|
||||||
"git_tags_url": "https://api.github.com/repos/docker/test-docker-action/git/tags{/sha}",
|
|
||||||
"git_url": "git://github.com/docker/test-docker-action.git",
|
|
||||||
"has_downloads": true,
|
|
||||||
"has_issues": true,
|
|
||||||
"has_pages": false,
|
|
||||||
"has_projects": true,
|
|
||||||
"has_wiki": true,
|
|
||||||
"homepage": "",
|
|
||||||
"hooks_url": "https://api.github.com/repos/docker/test-docker-action/hooks",
|
|
||||||
"html_url": "https://github.com/docker/test-docker-action",
|
|
||||||
"id": 285789493,
|
|
||||||
"is_template": false,
|
|
||||||
"issue_comment_url": "https://api.github.com/repos/docker/test-docker-action/issues/comments{/number}",
|
|
||||||
"issue_events_url": "https://api.github.com/repos/docker/test-docker-action/issues/events{/number}",
|
|
||||||
"issues_url": "https://api.github.com/repos/docker/test-docker-action/issues{/number}",
|
|
||||||
"keys_url": "https://api.github.com/repos/docker/test-docker-action/keys{/key_id}",
|
|
||||||
"labels_url": "https://api.github.com/repos/docker/test-docker-action/labels{/name}",
|
|
||||||
"language": "JavaScript",
|
|
||||||
"languages_url": "https://api.github.com/repos/docker/test-docker-action/languages",
|
|
||||||
"license": {
|
|
||||||
"key": "mit",
|
|
||||||
"name": "MIT License",
|
|
||||||
"node_id": "MDc6TGljZW5zZTEz",
|
|
||||||
"spdx_id": "MIT",
|
|
||||||
"url": "https://api.github.com/licenses/mit"
|
|
||||||
},
|
|
||||||
"merges_url": "https://api.github.com/repos/docker/test-docker-action/merges",
|
|
||||||
"milestones_url": "https://api.github.com/repos/docker/test-docker-action/milestones{/number}",
|
|
||||||
"mirror_url": null,
|
|
||||||
"name": "test-docker-action",
|
|
||||||
"node_id": "MDEwOlJlcG9zaXRvcnkyODU3ODk0OTM=",
|
|
||||||
"notifications_url": "https://api.github.com/repos/docker/test-docker-action/notifications{?since,all,participating}",
|
|
||||||
"open_issues": 6,
|
|
||||||
"open_issues_count": 6,
|
|
||||||
"owner": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/5429470?v=4",
|
|
||||||
"events_url": "https://api.github.com/users/docker/events{/privacy}",
|
|
||||||
"followers_url": "https://api.github.com/users/docker/followers",
|
|
||||||
"following_url": "https://api.github.com/users/docker/following{/other_user}",
|
|
||||||
"gists_url": "https://api.github.com/users/docker/gists{/gist_id}",
|
|
||||||
"gravatar_id": "",
|
|
||||||
"html_url": "https://github.com/docker",
|
|
||||||
"id": 5429470,
|
|
||||||
"login": "docker",
|
|
||||||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjU0Mjk0NzA=",
|
|
||||||
"organizations_url": "https://api.github.com/users/docker/orgs",
|
|
||||||
"received_events_url": "https://api.github.com/users/docker/received_events",
|
|
||||||
"repos_url": "https://api.github.com/users/docker/repos",
|
|
||||||
"site_admin": false,
|
|
||||||
"starred_url": "https://api.github.com/users/docker/starred{/owner}{/repo}",
|
|
||||||
"subscriptions_url": "https://api.github.com/users/docker/subscriptions",
|
|
||||||
"type": "Organization",
|
|
||||||
"url": "https://api.github.com/users/docker"
|
|
||||||
},
|
|
||||||
"private": true,
|
|
||||||
"pulls_url": "https://api.github.com/repos/docker/test-docker-action/pulls{/number}",
|
|
||||||
"pushed_at": "2022-04-19T09:41:03Z",
|
|
||||||
"releases_url": "https://api.github.com/repos/docker/test-docker-action/releases{/id}",
|
|
||||||
"size": 796,
|
|
||||||
"ssh_url": "git@github.com:docker/test-docker-action.git",
|
|
||||||
"stargazers_count": 0,
|
|
||||||
"stargazers_url": "https://api.github.com/repos/docker/test-docker-action/stargazers",
|
|
||||||
"statuses_url": "https://api.github.com/repos/docker/test-docker-action/statuses/{sha}",
|
|
||||||
"subscribers_url": "https://api.github.com/repos/docker/test-docker-action/subscribers",
|
|
||||||
"subscription_url": "https://api.github.com/repos/docker/test-docker-action/subscription",
|
|
||||||
"svn_url": "https://github.com/docker/test-docker-action",
|
|
||||||
"tags_url": "https://api.github.com/repos/docker/test-docker-action/tags",
|
|
||||||
"teams_url": "https://api.github.com/repos/docker/test-docker-action/teams",
|
|
||||||
"topics": [],
|
|
||||||
"trees_url": "https://api.github.com/repos/docker/test-docker-action/git/trees{/sha}",
|
|
||||||
"updated_at": "2022-04-19T09:05:09Z",
|
|
||||||
"url": "https://api.github.com/repos/docker/test-docker-action",
|
|
||||||
"visibility": "private",
|
|
||||||
"watchers": 0,
|
|
||||||
"watchers_count": 0
|
|
||||||
},
|
|
||||||
"sender": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/1951866?v=4",
|
|
||||||
"events_url": "https://api.github.com/users/crazy-max/events{/privacy}",
|
|
||||||
"followers_url": "https://api.github.com/users/crazy-max/followers",
|
|
||||||
"following_url": "https://api.github.com/users/crazy-max/following{/other_user}",
|
|
||||||
"gists_url": "https://api.github.com/users/crazy-max/gists{/gist_id}",
|
|
||||||
"gravatar_id": "",
|
|
||||||
"html_url": "https://github.com/crazy-max",
|
|
||||||
"id": 1951866,
|
|
||||||
"login": "crazy-max",
|
|
||||||
"node_id": "MDQ6VXNlcjE5NTE4NjY=",
|
|
||||||
"organizations_url": "https://api.github.com/users/crazy-max/orgs",
|
|
||||||
"received_events_url": "https://api.github.com/users/crazy-max/received_events",
|
|
||||||
"repos_url": "https://api.github.com/users/crazy-max/repos",
|
|
||||||
"site_admin": false,
|
|
||||||
"starred_url": "https://api.github.com/users/crazy-max/starred{/owner}{/repo}",
|
|
||||||
"subscriptions_url": "https://api.github.com/users/crazy-max/subscriptions",
|
|
||||||
"type": "User",
|
|
||||||
"url": "https://api.github.com/users/crazy-max"
|
|
||||||
},
|
|
||||||
"workflow": ".github/workflows/metadata.yml"
|
|
||||||
}
|
|
@ -1,30 +0,0 @@
|
|||||||
GITHUB_ACTION=__crazy-max_ghaction-dump-context
|
|
||||||
GITHUB_ACTIONS=true
|
|
||||||
GITHUB_ACTION_PATH=/home/runner/work/_actions/crazy-max/ghaction-dump-context/v1
|
|
||||||
GITHUB_ACTION_REF=
|
|
||||||
GITHUB_ACTION_REPOSITORY=
|
|
||||||
GITHUB_ACTOR=crazy-max
|
|
||||||
GITHUB_API_URL=https://api.github.com
|
|
||||||
GITHUB_BASE_REF=
|
|
||||||
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_81f7da89-3d0b-493a-af1f-c67e5f779727
|
|
||||||
GITHUB_EVENT_NAME=workflow_dispatch
|
|
||||||
GITHUB_EVENT_PATH=./__tests__/fixtures/event_workflow_dispatch_dev.json
|
|
||||||
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
|
|
||||||
GITHUB_HEAD_REF=
|
|
||||||
GITHUB_JOB=test
|
|
||||||
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_81f7da89-3d0b-493a-af1f-c67e5f779727
|
|
||||||
GITHUB_REF=refs/heads/dev
|
|
||||||
GITHUB_REF_NAME=dev
|
|
||||||
GITHUB_REF_PROTECTED=false
|
|
||||||
GITHUB_REF_TYPE=branch
|
|
||||||
GITHUB_REPOSITORY=docker/test-docker-action
|
|
||||||
GITHUB_REPOSITORY_OWNER=docker
|
|
||||||
GITHUB_RETENTION_DAYS=90
|
|
||||||
GITHUB_RUN_ATTEMPT=1
|
|
||||||
GITHUB_RUN_ID=2188848679
|
|
||||||
GITHUB_RUN_NUMBER=25
|
|
||||||
GITHUB_SERVER_URL=https://github.com
|
|
||||||
GITHUB_SHA=860c1904a1ce19322e91ac35af1ab07466440c37
|
|
||||||
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_81f7da89-3d0b-493a-af1f-c67e5f779727
|
|
||||||
GITHUB_WORKFLOW=metadata
|
|
||||||
GITHUB_WORKSPACE=/home/runner/work/test-docker-action/test-docker-action
|
|
@ -1,145 +0,0 @@
|
|||||||
{
|
|
||||||
"inputs": {
|
|
||||||
"logLevel": "warning"
|
|
||||||
},
|
|
||||||
"organization": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/5429470?v=4",
|
|
||||||
"description": "Docker helps developers bring their ideas to life by conquering the complexity of app development.",
|
|
||||||
"events_url": "https://api.github.com/orgs/docker/events",
|
|
||||||
"hooks_url": "https://api.github.com/orgs/docker/hooks",
|
|
||||||
"id": 5429470,
|
|
||||||
"issues_url": "https://api.github.com/orgs/docker/issues",
|
|
||||||
"login": "docker",
|
|
||||||
"members_url": "https://api.github.com/orgs/docker/members{/member}",
|
|
||||||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjU0Mjk0NzA=",
|
|
||||||
"public_members_url": "https://api.github.com/orgs/docker/public_members{/member}",
|
|
||||||
"repos_url": "https://api.github.com/orgs/docker/repos",
|
|
||||||
"url": "https://api.github.com/orgs/docker"
|
|
||||||
},
|
|
||||||
"ref": "refs/heads/dev",
|
|
||||||
"repository": {
|
|
||||||
"allow_forking": true,
|
|
||||||
"archive_url": "https://api.github.com/repos/docker/test-docker-action/{archive_format}{/ref}",
|
|
||||||
"archived": false,
|
|
||||||
"assignees_url": "https://api.github.com/repos/docker/test-docker-action/assignees{/user}",
|
|
||||||
"blobs_url": "https://api.github.com/repos/docker/test-docker-action/git/blobs{/sha}",
|
|
||||||
"branches_url": "https://api.github.com/repos/docker/test-docker-action/branches{/branch}",
|
|
||||||
"clone_url": "https://github.com/docker/test-docker-action.git",
|
|
||||||
"collaborators_url": "https://api.github.com/repos/docker/test-docker-action/collaborators{/collaborator}",
|
|
||||||
"comments_url": "https://api.github.com/repos/docker/test-docker-action/comments{/number}",
|
|
||||||
"commits_url": "https://api.github.com/repos/docker/test-docker-action/commits{/sha}",
|
|
||||||
"compare_url": "https://api.github.com/repos/docker/test-docker-action/compare/{base}...{head}",
|
|
||||||
"contents_url": "https://api.github.com/repos/docker/test-docker-action/contents/{+path}",
|
|
||||||
"contributors_url": "https://api.github.com/repos/docker/test-docker-action/contributors",
|
|
||||||
"created_at": "2020-08-07T09:23:00Z",
|
|
||||||
"default_branch": "master",
|
|
||||||
"deployments_url": "https://api.github.com/repos/docker/test-docker-action/deployments",
|
|
||||||
"description": "Test \"Docker\" Actions",
|
|
||||||
"disabled": false,
|
|
||||||
"downloads_url": "https://api.github.com/repos/docker/test-docker-action/downloads",
|
|
||||||
"events_url": "https://api.github.com/repos/docker/test-docker-action/events",
|
|
||||||
"fork": false,
|
|
||||||
"forks": 1,
|
|
||||||
"forks_count": 1,
|
|
||||||
"forks_url": "https://api.github.com/repos/docker/test-docker-action/forks",
|
|
||||||
"full_name": "docker/test-docker-action",
|
|
||||||
"git_commits_url": "https://api.github.com/repos/docker/test-docker-action/git/commits{/sha}",
|
|
||||||
"git_refs_url": "https://api.github.com/repos/docker/test-docker-action/git/refs{/sha}",
|
|
||||||
"git_tags_url": "https://api.github.com/repos/docker/test-docker-action/git/tags{/sha}",
|
|
||||||
"git_url": "git://github.com/docker/test-docker-action.git",
|
|
||||||
"has_downloads": true,
|
|
||||||
"has_issues": true,
|
|
||||||
"has_pages": false,
|
|
||||||
"has_projects": true,
|
|
||||||
"has_wiki": true,
|
|
||||||
"homepage": "",
|
|
||||||
"hooks_url": "https://api.github.com/repos/docker/test-docker-action/hooks",
|
|
||||||
"html_url": "https://github.com/docker/test-docker-action",
|
|
||||||
"id": 285789493,
|
|
||||||
"is_template": false,
|
|
||||||
"issue_comment_url": "https://api.github.com/repos/docker/test-docker-action/issues/comments{/number}",
|
|
||||||
"issue_events_url": "https://api.github.com/repos/docker/test-docker-action/issues/events{/number}",
|
|
||||||
"issues_url": "https://api.github.com/repos/docker/test-docker-action/issues{/number}",
|
|
||||||
"keys_url": "https://api.github.com/repos/docker/test-docker-action/keys{/key_id}",
|
|
||||||
"labels_url": "https://api.github.com/repos/docker/test-docker-action/labels{/name}",
|
|
||||||
"language": "JavaScript",
|
|
||||||
"languages_url": "https://api.github.com/repos/docker/test-docker-action/languages",
|
|
||||||
"license": {
|
|
||||||
"key": "mit",
|
|
||||||
"name": "MIT License",
|
|
||||||
"node_id": "MDc6TGljZW5zZTEz",
|
|
||||||
"spdx_id": "MIT",
|
|
||||||
"url": "https://api.github.com/licenses/mit"
|
|
||||||
},
|
|
||||||
"merges_url": "https://api.github.com/repos/docker/test-docker-action/merges",
|
|
||||||
"milestones_url": "https://api.github.com/repos/docker/test-docker-action/milestones{/number}",
|
|
||||||
"mirror_url": null,
|
|
||||||
"name": "test-docker-action",
|
|
||||||
"node_id": "MDEwOlJlcG9zaXRvcnkyODU3ODk0OTM=",
|
|
||||||
"notifications_url": "https://api.github.com/repos/docker/test-docker-action/notifications{?since,all,participating}",
|
|
||||||
"open_issues": 6,
|
|
||||||
"open_issues_count": 6,
|
|
||||||
"owner": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/5429470?v=4",
|
|
||||||
"events_url": "https://api.github.com/users/docker/events{/privacy}",
|
|
||||||
"followers_url": "https://api.github.com/users/docker/followers",
|
|
||||||
"following_url": "https://api.github.com/users/docker/following{/other_user}",
|
|
||||||
"gists_url": "https://api.github.com/users/docker/gists{/gist_id}",
|
|
||||||
"gravatar_id": "",
|
|
||||||
"html_url": "https://github.com/docker",
|
|
||||||
"id": 5429470,
|
|
||||||
"login": "docker",
|
|
||||||
"node_id": "MDEyOk9yZ2FuaXphdGlvbjU0Mjk0NzA=",
|
|
||||||
"organizations_url": "https://api.github.com/users/docker/orgs",
|
|
||||||
"received_events_url": "https://api.github.com/users/docker/received_events",
|
|
||||||
"repos_url": "https://api.github.com/users/docker/repos",
|
|
||||||
"site_admin": false,
|
|
||||||
"starred_url": "https://api.github.com/users/docker/starred{/owner}{/repo}",
|
|
||||||
"subscriptions_url": "https://api.github.com/users/docker/subscriptions",
|
|
||||||
"type": "Organization",
|
|
||||||
"url": "https://api.github.com/users/docker"
|
|
||||||
},
|
|
||||||
"private": true,
|
|
||||||
"pulls_url": "https://api.github.com/repos/docker/test-docker-action/pulls{/number}",
|
|
||||||
"pushed_at": "2022-04-19T09:41:03Z",
|
|
||||||
"releases_url": "https://api.github.com/repos/docker/test-docker-action/releases{/id}",
|
|
||||||
"size": 796,
|
|
||||||
"ssh_url": "git@github.com:docker/test-docker-action.git",
|
|
||||||
"stargazers_count": 0,
|
|
||||||
"stargazers_url": "https://api.github.com/repos/docker/test-docker-action/stargazers",
|
|
||||||
"statuses_url": "https://api.github.com/repos/docker/test-docker-action/statuses/{sha}",
|
|
||||||
"subscribers_url": "https://api.github.com/repos/docker/test-docker-action/subscribers",
|
|
||||||
"subscription_url": "https://api.github.com/repos/docker/test-docker-action/subscription",
|
|
||||||
"svn_url": "https://github.com/docker/test-docker-action",
|
|
||||||
"tags_url": "https://api.github.com/repos/docker/test-docker-action/tags",
|
|
||||||
"teams_url": "https://api.github.com/repos/docker/test-docker-action/teams",
|
|
||||||
"topics": [],
|
|
||||||
"trees_url": "https://api.github.com/repos/docker/test-docker-action/git/trees{/sha}",
|
|
||||||
"updated_at": "2022-04-19T09:05:09Z",
|
|
||||||
"url": "https://api.github.com/repos/docker/test-docker-action",
|
|
||||||
"visibility": "private",
|
|
||||||
"watchers": 0,
|
|
||||||
"watchers_count": 0
|
|
||||||
},
|
|
||||||
"sender": {
|
|
||||||
"avatar_url": "https://avatars.githubusercontent.com/u/1951866?v=4",
|
|
||||||
"events_url": "https://api.github.com/users/crazy-max/events{/privacy}",
|
|
||||||
"followers_url": "https://api.github.com/users/crazy-max/followers",
|
|
||||||
"following_url": "https://api.github.com/users/crazy-max/following{/other_user}",
|
|
||||||
"gists_url": "https://api.github.com/users/crazy-max/gists{/gist_id}",
|
|
||||||
"gravatar_id": "",
|
|
||||||
"html_url": "https://github.com/crazy-max",
|
|
||||||
"id": 1951866,
|
|
||||||
"login": "crazy-max",
|
|
||||||
"node_id": "MDQ6VXNlcjE5NTE4NjY=",
|
|
||||||
"organizations_url": "https://api.github.com/users/crazy-max/orgs",
|
|
||||||
"received_events_url": "https://api.github.com/users/crazy-max/received_events",
|
|
||||||
"repos_url": "https://api.github.com/users/crazy-max/repos",
|
|
||||||
"site_admin": false,
|
|
||||||
"starred_url": "https://api.github.com/users/crazy-max/starred{/owner}{/repo}",
|
|
||||||
"subscriptions_url": "https://api.github.com/users/crazy-max/subscriptions",
|
|
||||||
"type": "User",
|
|
||||||
"url": "https://api.github.com/users/crazy-max"
|
|
||||||
},
|
|
||||||
"workflow": ".github/workflows/metadata.yml"
|
|
||||||
}
|
|
@ -1,182 +0,0 @@
|
|||||||
import {describe, expect, test} from '@jest/globals';
|
|
||||||
|
|
||||||
import {Flavor, Transform} from '../src/flavor';
|
|
||||||
|
|
||||||
describe('transform', () => {
|
|
||||||
// prettier-ignore
|
|
||||||
test.each([
|
|
||||||
[
|
|
||||||
[
|
|
||||||
`randomstr`,
|
|
||||||
`latest=auto`
|
|
||||||
],
|
|
||||||
{} as Flavor,
|
|
||||||
true
|
|
||||||
],
|
|
||||||
[
|
|
||||||
[
|
|
||||||
`unknwown=foo`
|
|
||||||
],
|
|
||||||
{} as Flavor,
|
|
||||||
true
|
|
||||||
],
|
|
||||||
[
|
|
||||||
[
|
|
||||||
`latest`,
|
|
||||||
],
|
|
||||||
{} as Flavor,
|
|
||||||
true
|
|
||||||
],
|
|
||||||
[
|
|
||||||
[
|
|
||||||
`latest=true`
|
|
||||||
],
|
|
||||||
{
|
|
||||||
latest: "true",
|
|
||||||
prefix: "",
|
|
||||||
prefixLatest: false,
|
|
||||||
suffix: "",
|
|
||||||
suffixLatest: false,
|
|
||||||
} as Flavor,
|
|
||||||
false
|
|
||||||
],
|
|
||||||
[
|
|
||||||
[
|
|
||||||
`latest=false`
|
|
||||||
],
|
|
||||||
{
|
|
||||||
latest: "false",
|
|
||||||
prefix: "",
|
|
||||||
prefixLatest: false,
|
|
||||||
suffix: "",
|
|
||||||
suffixLatest: false,
|
|
||||||
} as Flavor,
|
|
||||||
false
|
|
||||||
],
|
|
||||||
[
|
|
||||||
[
|
|
||||||
`latest=auto`
|
|
||||||
],
|
|
||||||
{
|
|
||||||
latest: "auto",
|
|
||||||
prefix: "",
|
|
||||||
prefixLatest: false,
|
|
||||||
suffix: "",
|
|
||||||
suffixLatest: false,
|
|
||||||
} as Flavor,
|
|
||||||
false
|
|
||||||
],
|
|
||||||
[
|
|
||||||
[
|
|
||||||
`latest=foo`
|
|
||||||
],
|
|
||||||
{} as Flavor,
|
|
||||||
true
|
|
||||||
],
|
|
||||||
[
|
|
||||||
[
|
|
||||||
`prefix=sha-`
|
|
||||||
],
|
|
||||||
{
|
|
||||||
latest: "auto",
|
|
||||||
prefix: "sha-",
|
|
||||||
prefixLatest: false,
|
|
||||||
suffix: "",
|
|
||||||
suffixLatest: false,
|
|
||||||
} as Flavor,
|
|
||||||
false
|
|
||||||
],
|
|
||||||
[
|
|
||||||
[
|
|
||||||
`suffix=-alpine`
|
|
||||||
],
|
|
||||||
{
|
|
||||||
latest: "auto",
|
|
||||||
prefix: "",
|
|
||||||
prefixLatest: false,
|
|
||||||
suffix: "-alpine",
|
|
||||||
suffixLatest: false,
|
|
||||||
} as Flavor,
|
|
||||||
false
|
|
||||||
],
|
|
||||||
[
|
|
||||||
[
|
|
||||||
`latest=false`,
|
|
||||||
`prefix=dev-`,
|
|
||||||
`suffix=-alpine`
|
|
||||||
],
|
|
||||||
{
|
|
||||||
latest: "false",
|
|
||||||
prefix: "dev-",
|
|
||||||
prefixLatest: false,
|
|
||||||
suffix: "-alpine",
|
|
||||||
suffixLatest: false,
|
|
||||||
} as Flavor,
|
|
||||||
false
|
|
||||||
],
|
|
||||||
[
|
|
||||||
[
|
|
||||||
`prefix=dev-,onlatest=true`,
|
|
||||||
],
|
|
||||||
{
|
|
||||||
latest: "auto",
|
|
||||||
prefix: "dev-",
|
|
||||||
prefixLatest: true,
|
|
||||||
suffix: "",
|
|
||||||
suffixLatest: false,
|
|
||||||
} as Flavor,
|
|
||||||
false
|
|
||||||
],
|
|
||||||
[
|
|
||||||
[
|
|
||||||
`suffix=-alpine,onlatest=true`,
|
|
||||||
],
|
|
||||||
{
|
|
||||||
latest: "auto",
|
|
||||||
prefix: "",
|
|
||||||
prefixLatest: false,
|
|
||||||
suffix: "-alpine",
|
|
||||||
suffixLatest: true,
|
|
||||||
} as Flavor,
|
|
||||||
false
|
|
||||||
],
|
|
||||||
[
|
|
||||||
[
|
|
||||||
`prefix=dev-,onlatest=true`,
|
|
||||||
`suffix=-alpine,onlatest=true`,
|
|
||||||
],
|
|
||||||
{
|
|
||||||
latest: "auto",
|
|
||||||
prefix: "dev-",
|
|
||||||
prefixLatest: true,
|
|
||||||
suffix: "-alpine",
|
|
||||||
suffixLatest: true,
|
|
||||||
} as Flavor,
|
|
||||||
false
|
|
||||||
],
|
|
||||||
[
|
|
||||||
[
|
|
||||||
`prefix= `,
|
|
||||||
],
|
|
||||||
{
|
|
||||||
latest: "auto",
|
|
||||||
prefix: "",
|
|
||||||
prefixLatest: false,
|
|
||||||
suffix: "",
|
|
||||||
suffixLatest: false,
|
|
||||||
} as Flavor,
|
|
||||||
false
|
|
||||||
]
|
|
||||||
])('given %p attributes', async (inputs: string[], expected: Flavor, invalid: boolean) => {
|
|
||||||
try {
|
|
||||||
const flavor = Transform(inputs);
|
|
||||||
expect(flavor).toEqual(expected);
|
|
||||||
} catch (err) {
|
|
||||||
if (!invalid) {
|
|
||||||
console.error(err);
|
|
||||||
}
|
|
||||||
// eslint-disable-next-line jest/no-conditional-expect
|
|
||||||
expect(true).toBe(invalid);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
17
__tests__/github.test.ts
Normal file
17
__tests__/github.test.ts
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
import * as path from 'path';
|
||||||
|
import * as github from '../src/github';
|
||||||
|
import {ReposGetResponseData} from '@octokit/types';
|
||||||
|
|
||||||
|
jest.spyOn(github, 'repo').mockImplementation(
|
||||||
|
(): Promise<ReposGetResponseData> => {
|
||||||
|
return <Promise<ReposGetResponseData>>require(path.join(__dirname, 'fixtures', 'repo.json'));
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
describe('repo', () => {
|
||||||
|
it('returns GitHub repository', async () => {
|
||||||
|
const repo = await github.repo(process.env.GITHUB_TOKEN || '');
|
||||||
|
console.log(repo);
|
||||||
|
expect(repo.name).not.toBeNull();
|
||||||
|
});
|
||||||
|
});
|
@ -1,102 +0,0 @@
|
|||||||
import {describe, expect, test} from '@jest/globals';
|
|
||||||
|
|
||||||
import {Transform, Image} from '../src/image';
|
|
||||||
|
|
||||||
describe('transform', () => {
|
|
||||||
// prettier-ignore
|
|
||||||
test.each([
|
|
||||||
[
|
|
||||||
[
|
|
||||||
`name/foo`
|
|
||||||
],
|
|
||||||
[
|
|
||||||
{
|
|
||||||
name: `name/foo`,
|
|
||||||
enable: true,
|
|
||||||
}
|
|
||||||
] as Image[],
|
|
||||||
false
|
|
||||||
],
|
|
||||||
[
|
|
||||||
[
|
|
||||||
`name/foo,name/bar`
|
|
||||||
],
|
|
||||||
[
|
|
||||||
{
|
|
||||||
name: `name/foo`,
|
|
||||||
enable: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: `name/bar`,
|
|
||||||
enable: true,
|
|
||||||
}
|
|
||||||
] as Image[],
|
|
||||||
false
|
|
||||||
],
|
|
||||||
[
|
|
||||||
[
|
|
||||||
`name/foo`,
|
|
||||||
`name/bar`
|
|
||||||
],
|
|
||||||
[
|
|
||||||
{
|
|
||||||
name: `name/foo`,
|
|
||||||
enable: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: `name/bar`,
|
|
||||||
enable: true,
|
|
||||||
}
|
|
||||||
] as Image[],
|
|
||||||
false
|
|
||||||
],
|
|
||||||
[
|
|
||||||
[
|
|
||||||
`name=name/bar`,
|
|
||||||
`name/foo,enable=false`,
|
|
||||||
`name=ghcr.io/UserName/Foo,enable=true`
|
|
||||||
],
|
|
||||||
[
|
|
||||||
{
|
|
||||||
name: `name/bar`,
|
|
||||||
enable: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: `name/foo`,
|
|
||||||
enable: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: `ghcr.io/UserName/Foo`,
|
|
||||||
enable: true,
|
|
||||||
},
|
|
||||||
] as Image[],
|
|
||||||
false
|
|
||||||
],
|
|
||||||
[
|
|
||||||
[`value=name/foo`], undefined, true
|
|
||||||
],
|
|
||||||
[
|
|
||||||
[`name/foo,enable=bar`], undefined, true
|
|
||||||
],
|
|
||||||
[
|
|
||||||
[`name/foo,bar=baz`], undefined, true
|
|
||||||
],
|
|
||||||
[
|
|
||||||
[`name=,enable=true`], undefined, true
|
|
||||||
],
|
|
||||||
[
|
|
||||||
[`name/foo,name=name/bar,enable=true`], undefined, true
|
|
||||||
]
|
|
||||||
])('given %p', async (l: string[], expected: Image[] | undefined, invalid: boolean) => {
|
|
||||||
try {
|
|
||||||
const images = Transform(l);
|
|
||||||
expect(images).toEqual(expected);
|
|
||||||
} catch (err) {
|
|
||||||
if (!invalid) {
|
|
||||||
console.error(err);
|
|
||||||
}
|
|
||||||
// eslint-disable-next-line jest/no-conditional-expect
|
|
||||||
expect(true).toBe(invalid);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
File diff suppressed because it is too large
Load Diff
@ -1,450 +0,0 @@
|
|||||||
import {describe, expect, test} from '@jest/globals';
|
|
||||||
|
|
||||||
import {Transform, Parse, Tag, Type, RefEvent, ShaFormat, DefaultPriorities} from '../src/tag';
|
|
||||||
|
|
||||||
describe('transform', () => {
|
|
||||||
// prettier-ignore
|
|
||||||
test.each([
|
|
||||||
[
|
|
||||||
[
|
|
||||||
`type=ref,event=branch`,
|
|
||||||
`type=ref,event=tag`,
|
|
||||||
`type=ref,event=pr`,
|
|
||||||
`type=schedule`,
|
|
||||||
`type=sha`,
|
|
||||||
`type=raw,foo`,
|
|
||||||
`type=edge`,
|
|
||||||
`type=semver,pattern={{version}}`,
|
|
||||||
`type=match,"pattern=\\d.\\d.\\d",group=0`
|
|
||||||
],
|
|
||||||
[
|
|
||||||
{
|
|
||||||
type: Type.Schedule,
|
|
||||||
attrs: {
|
|
||||||
"priority": DefaultPriorities[Type.Schedule],
|
|
||||||
"enable": "true",
|
|
||||||
"pattern": "nightly"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: Type.Semver,
|
|
||||||
attrs: {
|
|
||||||
"priority": DefaultPriorities[Type.Semver],
|
|
||||||
"enable": "true",
|
|
||||||
"pattern": "{{version}}",
|
|
||||||
"value": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: Type.Match,
|
|
||||||
attrs: {
|
|
||||||
"priority": DefaultPriorities[Type.Match],
|
|
||||||
"enable": "true",
|
|
||||||
"pattern": "\\d.\\d.\\d",
|
|
||||||
"group": "0",
|
|
||||||
"value": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: Type.Edge,
|
|
||||||
attrs: {
|
|
||||||
"priority": DefaultPriorities[Type.Edge],
|
|
||||||
"enable": "true",
|
|
||||||
"branch": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: Type.Ref,
|
|
||||||
attrs: {
|
|
||||||
"priority": DefaultPriorities[Type.Ref],
|
|
||||||
"enable": "true",
|
|
||||||
"event": RefEvent.Branch
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: Type.Ref,
|
|
||||||
attrs: {
|
|
||||||
"priority": DefaultPriorities[Type.Ref],
|
|
||||||
"enable": "true",
|
|
||||||
"event": RefEvent.Tag
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: Type.Ref,
|
|
||||||
attrs: {
|
|
||||||
"priority": DefaultPriorities[Type.Ref],
|
|
||||||
"enable": "true",
|
|
||||||
"prefix": "pr-",
|
|
||||||
"event": RefEvent.PR
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: Type.Raw,
|
|
||||||
attrs: {
|
|
||||||
"priority": DefaultPriorities[Type.Raw],
|
|
||||||
"enable": "true",
|
|
||||||
"value": "foo"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: Type.Sha,
|
|
||||||
attrs: {
|
|
||||||
"priority": DefaultPriorities[Type.Sha],
|
|
||||||
"enable": "true",
|
|
||||||
"prefix": "sha-",
|
|
||||||
"format": ShaFormat.Short
|
|
||||||
}
|
|
||||||
}
|
|
||||||
] as Tag[],
|
|
||||||
false
|
|
||||||
]
|
|
||||||
])('given %p', async (l: string[], expected: Tag[], invalid: boolean) => {
|
|
||||||
try {
|
|
||||||
const tags = Transform(l);
|
|
||||||
expect(tags).toEqual(expected);
|
|
||||||
} catch (err) {
|
|
||||||
if (!invalid) {
|
|
||||||
console.error(err);
|
|
||||||
}
|
|
||||||
// eslint-disable-next-line jest/no-conditional-expect
|
|
||||||
expect(true).toBe(invalid);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('parse', () => {
|
|
||||||
// prettier-ignore
|
|
||||||
test.each([
|
|
||||||
[
|
|
||||||
`type=schedule,enable=true,pattern={{date 'YYYYMMDD'}}`,
|
|
||||||
{
|
|
||||||
type: Type.Schedule,
|
|
||||||
attrs: {
|
|
||||||
"priority": DefaultPriorities[Type.Schedule],
|
|
||||||
"enable": "true",
|
|
||||||
"pattern": "{{date 'YYYYMMDD'}}"
|
|
||||||
}
|
|
||||||
} as Tag,
|
|
||||||
false
|
|
||||||
],
|
|
||||||
[
|
|
||||||
`type=schedule,enable=true,pattern={{date 'YYYYMMDD' tz='Asia/Tokyo'}}`,
|
|
||||||
{
|
|
||||||
type: Type.Schedule,
|
|
||||||
attrs: {
|
|
||||||
"priority": DefaultPriorities[Type.Schedule],
|
|
||||||
"enable": "true",
|
|
||||||
"pattern": `{{date 'YYYYMMDD' tz='Asia/Tokyo'}}`
|
|
||||||
}
|
|
||||||
} as Tag,
|
|
||||||
false
|
|
||||||
],
|
|
||||||
[
|
|
||||||
`type=semver,enable=true,pattern={{version}}`,
|
|
||||||
{
|
|
||||||
type: Type.Semver,
|
|
||||||
attrs: {
|
|
||||||
"priority": DefaultPriorities[Type.Semver],
|
|
||||||
"enable": "true",
|
|
||||||
"pattern": "{{version}}",
|
|
||||||
"value": ""
|
|
||||||
}
|
|
||||||
} as Tag,
|
|
||||||
false
|
|
||||||
],
|
|
||||||
[
|
|
||||||
`type=semver,priority=1,enable=true,pattern={{version}}`,
|
|
||||||
{
|
|
||||||
type: Type.Semver,
|
|
||||||
attrs: {
|
|
||||||
"priority": "1",
|
|
||||||
"enable": "true",
|
|
||||||
"pattern": "{{version}}",
|
|
||||||
"value": ""
|
|
||||||
}
|
|
||||||
} as Tag,
|
|
||||||
false
|
|
||||||
],
|
|
||||||
[
|
|
||||||
`type=semver,priority=1,enable=true,pattern={{version}},value=v1.0.0`,
|
|
||||||
{
|
|
||||||
type: Type.Semver,
|
|
||||||
attrs: {
|
|
||||||
"priority": "1",
|
|
||||||
"enable": "true",
|
|
||||||
"pattern": "{{version}}",
|
|
||||||
"value": "v1.0.0"
|
|
||||||
}
|
|
||||||
} as Tag,
|
|
||||||
false
|
|
||||||
],
|
|
||||||
[
|
|
||||||
`type=match,enable=true,pattern=v(.*),group=1`,
|
|
||||||
{
|
|
||||||
type: Type.Match,
|
|
||||||
attrs: {
|
|
||||||
"priority": DefaultPriorities[Type.Match],
|
|
||||||
"enable": "true",
|
|
||||||
"pattern": "v(.*)",
|
|
||||||
"group": "1",
|
|
||||||
"value": ""
|
|
||||||
}
|
|
||||||
} as Tag,
|
|
||||||
false
|
|
||||||
],
|
|
||||||
[
|
|
||||||
`type=match,enable=true,"pattern=^v(\\d.\\d.\\d)$",group=1`,
|
|
||||||
{
|
|
||||||
type: Type.Match,
|
|
||||||
attrs: {
|
|
||||||
"priority": DefaultPriorities[Type.Match],
|
|
||||||
"enable": "true",
|
|
||||||
"pattern": "^v(\\d.\\d.\\d)$",
|
|
||||||
"group": "1",
|
|
||||||
"value": ""
|
|
||||||
}
|
|
||||||
} as Tag,
|
|
||||||
false
|
|
||||||
],
|
|
||||||
[
|
|
||||||
`type=match,priority=700,enable=true,pattern=v(.*),group=1`,
|
|
||||||
{
|
|
||||||
type: Type.Match,
|
|
||||||
attrs: {
|
|
||||||
"priority": "700",
|
|
||||||
"enable": "true",
|
|
||||||
"pattern": "v(.*)",
|
|
||||||
"group": "1",
|
|
||||||
"value": ""
|
|
||||||
}
|
|
||||||
} as Tag,
|
|
||||||
false
|
|
||||||
],
|
|
||||||
[
|
|
||||||
`type=match,enable=true,pattern=v(.*),group=1,value=v1.2.3`,
|
|
||||||
{
|
|
||||||
type: Type.Match,
|
|
||||||
attrs: {
|
|
||||||
"priority": DefaultPriorities[Type.Match],
|
|
||||||
"enable": "true",
|
|
||||||
"pattern": "v(.*)",
|
|
||||||
"group": "1",
|
|
||||||
"value": "v1.2.3"
|
|
||||||
}
|
|
||||||
} as Tag,
|
|
||||||
false
|
|
||||||
],
|
|
||||||
[
|
|
||||||
`type=match,enable=true,pattern=v(.*),group=foo`,
|
|
||||||
{} as Tag,
|
|
||||||
true
|
|
||||||
],
|
|
||||||
[
|
|
||||||
`type=edge`,
|
|
||||||
{
|
|
||||||
type: Type.Edge,
|
|
||||||
attrs: {
|
|
||||||
"priority": DefaultPriorities[Type.Edge],
|
|
||||||
"enable": "true",
|
|
||||||
"branch": ""
|
|
||||||
}
|
|
||||||
} as Tag,
|
|
||||||
false
|
|
||||||
],
|
|
||||||
[
|
|
||||||
`type=edge,enable=true,branch=master`,
|
|
||||||
{
|
|
||||||
type: Type.Edge,
|
|
||||||
attrs: {
|
|
||||||
"priority": DefaultPriorities[Type.Edge],
|
|
||||||
"enable": "true",
|
|
||||||
"branch": "master"
|
|
||||||
}
|
|
||||||
} as Tag,
|
|
||||||
false
|
|
||||||
],
|
|
||||||
[
|
|
||||||
`type=ref,event=tag`,
|
|
||||||
{
|
|
||||||
type: Type.Ref,
|
|
||||||
attrs: {
|
|
||||||
"priority": DefaultPriorities[Type.Ref],
|
|
||||||
"enable": "true",
|
|
||||||
"event": RefEvent.Tag
|
|
||||||
}
|
|
||||||
} as Tag,
|
|
||||||
false
|
|
||||||
],
|
|
||||||
[
|
|
||||||
`type=ref,event=branch`,
|
|
||||||
{
|
|
||||||
type: Type.Ref,
|
|
||||||
attrs: {
|
|
||||||
"priority": DefaultPriorities[Type.Ref],
|
|
||||||
"enable": "true",
|
|
||||||
"event": RefEvent.Branch
|
|
||||||
}
|
|
||||||
} as Tag,
|
|
||||||
false
|
|
||||||
],
|
|
||||||
[
|
|
||||||
`type=ref,event=pr`,
|
|
||||||
{
|
|
||||||
type: Type.Ref,
|
|
||||||
attrs: {
|
|
||||||
"priority": DefaultPriorities[Type.Ref],
|
|
||||||
"enable": "true",
|
|
||||||
"prefix": "pr-",
|
|
||||||
"event": RefEvent.PR
|
|
||||||
}
|
|
||||||
} as Tag,
|
|
||||||
false
|
|
||||||
],
|
|
||||||
[
|
|
||||||
`type=ref,event=foo`,
|
|
||||||
{} as Tag,
|
|
||||||
true
|
|
||||||
],
|
|
||||||
[
|
|
||||||
`type=ref`,
|
|
||||||
{} as Tag,
|
|
||||||
true
|
|
||||||
],
|
|
||||||
[
|
|
||||||
`acustomtag`,
|
|
||||||
{
|
|
||||||
type: Type.Raw,
|
|
||||||
attrs: {
|
|
||||||
"priority": DefaultPriorities[Type.Raw],
|
|
||||||
"enable": "true",
|
|
||||||
"value": "acustomtag"
|
|
||||||
}
|
|
||||||
} as Tag,
|
|
||||||
false
|
|
||||||
],
|
|
||||||
[
|
|
||||||
`type=raw`,
|
|
||||||
{} as Tag,
|
|
||||||
true
|
|
||||||
],
|
|
||||||
[
|
|
||||||
`type=raw,value=acustomtag2`,
|
|
||||||
{
|
|
||||||
type: Type.Raw,
|
|
||||||
attrs: {
|
|
||||||
"priority": DefaultPriorities[Type.Raw],
|
|
||||||
"enable": "true",
|
|
||||||
"value": "acustomtag2"
|
|
||||||
}
|
|
||||||
} as Tag,
|
|
||||||
false
|
|
||||||
],
|
|
||||||
[
|
|
||||||
`type=raw,enable=true,value=acustomtag4`,
|
|
||||||
{
|
|
||||||
type: Type.Raw,
|
|
||||||
attrs: {
|
|
||||||
"priority": DefaultPriorities[Type.Raw],
|
|
||||||
"enable": "true",
|
|
||||||
"value": "acustomtag4"
|
|
||||||
}
|
|
||||||
} as Tag,
|
|
||||||
false
|
|
||||||
],
|
|
||||||
[
|
|
||||||
`type=raw,enable=false,value=acustomtag5`,
|
|
||||||
{
|
|
||||||
type: Type.Raw,
|
|
||||||
attrs: {
|
|
||||||
"priority": DefaultPriorities[Type.Raw],
|
|
||||||
"enable": "false",
|
|
||||||
"value": "acustomtag5"
|
|
||||||
}
|
|
||||||
} as Tag,
|
|
||||||
false
|
|
||||||
],
|
|
||||||
[
|
|
||||||
`type=sha`,
|
|
||||||
{
|
|
||||||
type: Type.Sha,
|
|
||||||
attrs: {
|
|
||||||
"priority": DefaultPriorities[Type.Sha],
|
|
||||||
"enable": "true",
|
|
||||||
"prefix": "sha-",
|
|
||||||
"format": ShaFormat.Short
|
|
||||||
}
|
|
||||||
} as Tag,
|
|
||||||
false
|
|
||||||
],
|
|
||||||
[
|
|
||||||
`type=sha,format=long`,
|
|
||||||
{
|
|
||||||
type: Type.Sha,
|
|
||||||
attrs: {
|
|
||||||
"priority": DefaultPriorities[Type.Sha],
|
|
||||||
"enable": "true",
|
|
||||||
"prefix": "sha-",
|
|
||||||
"format": ShaFormat.Long
|
|
||||||
}
|
|
||||||
} as Tag,
|
|
||||||
false
|
|
||||||
],
|
|
||||||
[
|
|
||||||
`type=sha,prefix=`,
|
|
||||||
{
|
|
||||||
type: Type.Sha,
|
|
||||||
attrs: {
|
|
||||||
"priority": DefaultPriorities[Type.Sha],
|
|
||||||
"enable": "true",
|
|
||||||
"prefix": "",
|
|
||||||
"format": ShaFormat.Short
|
|
||||||
}
|
|
||||||
} as Tag,
|
|
||||||
false
|
|
||||||
],
|
|
||||||
[
|
|
||||||
`type=sha,enable=false`,
|
|
||||||
{
|
|
||||||
type: Type.Sha,
|
|
||||||
attrs: {
|
|
||||||
"priority": DefaultPriorities[Type.Sha],
|
|
||||||
"enable": "false",
|
|
||||||
"prefix": "sha-",
|
|
||||||
"format": ShaFormat.Short
|
|
||||||
}
|
|
||||||
} as Tag,
|
|
||||||
false
|
|
||||||
],
|
|
||||||
[
|
|
||||||
`type=semver`,
|
|
||||||
{} as Tag,
|
|
||||||
true
|
|
||||||
],
|
|
||||||
[
|
|
||||||
`type=match`,
|
|
||||||
{} as Tag,
|
|
||||||
true
|
|
||||||
],
|
|
||||||
[
|
|
||||||
`type=foo`,
|
|
||||||
{} as Tag,
|
|
||||||
true
|
|
||||||
],
|
|
||||||
[
|
|
||||||
`type=sha,format=foo`,
|
|
||||||
{} as Tag,
|
|
||||||
true
|
|
||||||
]
|
|
||||||
])('given %p event', async (s: string, expected: Tag, invalid: boolean) => {
|
|
||||||
try {
|
|
||||||
const tag = Parse(s);
|
|
||||||
expect(tag).toEqual(expected);
|
|
||||||
} catch (err) {
|
|
||||||
if (!invalid) {
|
|
||||||
console.error(err);
|
|
||||||
}
|
|
||||||
// eslint-disable-next-line jest/no-conditional-expect
|
|
||||||
expect(true).toBe(invalid);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
55
action.yml
55
action.yml
@ -1,30 +1,35 @@
|
|||||||
# https://help.github.com/en/articles/metadata-syntax-for-github-actions
|
# https://help.github.com/en/articles/metadata-syntax-for-github-actions
|
||||||
name: 'Docker Metadata action'
|
name: 'Docker Meta'
|
||||||
description: "GitHub Action to extract metadata (tags, labels) for Docker"
|
description: "GitHub Action to extract metadata (tags, labels) for Docker"
|
||||||
author: 'docker'
|
author: 'crazy-max'
|
||||||
branding:
|
branding:
|
||||||
icon: 'anchor'
|
|
||||||
color: 'blue'
|
color: 'blue'
|
||||||
|
icon: 'layers'
|
||||||
|
|
||||||
inputs:
|
inputs:
|
||||||
context:
|
|
||||||
description: 'Where to get context data. Allowed options are "workflow" (default), "git".'
|
|
||||||
default: "workflow"
|
|
||||||
required: true
|
|
||||||
images:
|
images:
|
||||||
description: 'List of Docker images to use as base name for tags'
|
description: 'List of Docker images to use as base name for tags'
|
||||||
|
required: true
|
||||||
|
tag-sha:
|
||||||
|
description: 'Add git short SHA as Docker tag'
|
||||||
|
default: 'false'
|
||||||
required: false
|
required: false
|
||||||
tags:
|
tag-edge:
|
||||||
description: 'List of tags as key-value pair attributes'
|
description: 'Enable edge branch tagging'
|
||||||
|
default: 'false'
|
||||||
required: false
|
required: false
|
||||||
flavor:
|
tag-edge-branch:
|
||||||
description: 'Flavors to apply'
|
description: 'Branch that will be tagged as edge (default repo.default_branch)'
|
||||||
required: false
|
required: false
|
||||||
labels:
|
tag-coerce-tag:
|
||||||
description: 'List of custom labels'
|
description: 'Coerces Git tag to semver if possible using template'
|
||||||
required: false
|
required: false
|
||||||
annotations:
|
tag-latest-match:
|
||||||
description: 'List of custom annotations'
|
description: 'Set latest tag only if matches with a pattern'
|
||||||
|
required: false
|
||||||
|
tag-schedule:
|
||||||
|
description: 'Template to apply to schedule tag'
|
||||||
|
default: 'nightly'
|
||||||
required: false
|
required: false
|
||||||
sep-tags:
|
sep-tags:
|
||||||
description: 'Separator to use for tags output (default \n)'
|
description: 'Separator to use for tags output (default \n)'
|
||||||
@ -32,12 +37,6 @@ inputs:
|
|||||||
sep-labels:
|
sep-labels:
|
||||||
description: 'Separator to use for labels output (default \n)'
|
description: 'Separator to use for labels output (default \n)'
|
||||||
required: false
|
required: false
|
||||||
sep-annotations:
|
|
||||||
description: 'Separator to use for annotations output (default \n)'
|
|
||||||
required: false
|
|
||||||
bake-target:
|
|
||||||
description: 'Bake target name (default docker-metadata-action)'
|
|
||||||
required: false
|
|
||||||
github-token:
|
github-token:
|
||||||
description: 'GitHub Token as provided by secrets'
|
description: 'GitHub Token as provided by secrets'
|
||||||
default: ${{ github.token }}
|
default: ${{ github.token }}
|
||||||
@ -50,19 +49,7 @@ outputs:
|
|||||||
description: 'Generated Docker tags'
|
description: 'Generated Docker tags'
|
||||||
labels:
|
labels:
|
||||||
description: 'Generated Docker labels'
|
description: 'Generated Docker labels'
|
||||||
annotations:
|
|
||||||
description: 'Generated annotations'
|
|
||||||
json:
|
|
||||||
description: 'JSON output of tags and labels'
|
|
||||||
bake-file-tags:
|
|
||||||
description: 'Bake definition file with tags'
|
|
||||||
bake-file-labels:
|
|
||||||
description: 'Bake definition file with labels'
|
|
||||||
bake-file-annotations:
|
|
||||||
description: 'Bake definition file with annotations'
|
|
||||||
bake-file:
|
|
||||||
description: 'Bake definition file with tags and labels'
|
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: 'node20'
|
using: 'node12'
|
||||||
main: 'dist/index.js'
|
main: 'dist/index.js'
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
comment: false
|
|
||||||
github_checks:
|
|
||||||
annotations: false
|
|
@ -1,80 +0,0 @@
|
|||||||
# syntax=docker/dockerfile:1
|
|
||||||
|
|
||||||
ARG NODE_VERSION=20
|
|
||||||
|
|
||||||
FROM node:${NODE_VERSION}-alpine AS base
|
|
||||||
RUN apk add --no-cache cpio findutils git
|
|
||||||
WORKDIR /src
|
|
||||||
RUN --mount=type=bind,target=.,rw \
|
|
||||||
--mount=type=cache,target=/src/.yarn/cache <<EOT
|
|
||||||
corepack enable
|
|
||||||
yarn --version
|
|
||||||
yarn config set --home enableTelemetry 0
|
|
||||||
EOT
|
|
||||||
|
|
||||||
FROM base AS deps
|
|
||||||
RUN --mount=type=bind,target=.,rw \
|
|
||||||
--mount=type=cache,target=/src/.yarn/cache \
|
|
||||||
--mount=type=cache,target=/src/node_modules \
|
|
||||||
yarn install && mkdir /vendor && cp yarn.lock /vendor
|
|
||||||
|
|
||||||
FROM scratch AS vendor-update
|
|
||||||
COPY --from=deps /vendor /
|
|
||||||
|
|
||||||
FROM deps AS vendor-validate
|
|
||||||
RUN --mount=type=bind,target=.,rw <<EOT
|
|
||||||
set -e
|
|
||||||
git add -A
|
|
||||||
cp -rf /vendor/* .
|
|
||||||
if [ -n "$(git status --porcelain -- yarn.lock)" ]; then
|
|
||||||
echo >&2 'ERROR: Vendor result differs. Please vendor your package with "docker buildx bake vendor"'
|
|
||||||
git status --porcelain -- yarn.lock
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
EOT
|
|
||||||
|
|
||||||
FROM deps AS build
|
|
||||||
RUN --mount=type=bind,target=.,rw \
|
|
||||||
--mount=type=cache,target=/src/.yarn/cache \
|
|
||||||
--mount=type=cache,target=/src/node_modules \
|
|
||||||
yarn run build && mkdir /out && cp -Rf dist /out/
|
|
||||||
|
|
||||||
FROM scratch AS build-update
|
|
||||||
COPY --from=build /out /
|
|
||||||
|
|
||||||
FROM build AS build-validate
|
|
||||||
RUN --mount=type=bind,target=.,rw <<EOT
|
|
||||||
set -e
|
|
||||||
git add -A
|
|
||||||
cp -rf /out/* .
|
|
||||||
if [ -n "$(git status --porcelain -- dist)" ]; then
|
|
||||||
echo >&2 'ERROR: Build result differs. Please build first with "docker buildx bake build"'
|
|
||||||
git status --porcelain -- dist
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
EOT
|
|
||||||
|
|
||||||
FROM deps AS format
|
|
||||||
RUN --mount=type=bind,target=.,rw \
|
|
||||||
--mount=type=cache,target=/src/.yarn/cache \
|
|
||||||
--mount=type=cache,target=/src/node_modules \
|
|
||||||
yarn run format \
|
|
||||||
&& mkdir /out && find . -name '*.ts' -not -path './node_modules/*' -not -path './.yarn/*' | cpio -pdm /out
|
|
||||||
|
|
||||||
FROM scratch AS format-update
|
|
||||||
COPY --from=format /out /
|
|
||||||
|
|
||||||
FROM deps AS lint
|
|
||||||
RUN --mount=type=bind,target=.,rw \
|
|
||||||
--mount=type=cache,target=/src/.yarn/cache \
|
|
||||||
--mount=type=cache,target=/src/node_modules \
|
|
||||||
yarn run lint
|
|
||||||
|
|
||||||
FROM deps AS test
|
|
||||||
RUN --mount=type=bind,target=.,rw \
|
|
||||||
--mount=type=cache,target=/src/.yarn/cache \
|
|
||||||
--mount=type=cache,target=/src/node_modules \
|
|
||||||
yarn run test --coverage --coverageDirectory=/tmp/coverage
|
|
||||||
|
|
||||||
FROM scratch AS test-coverage
|
|
||||||
COPY --from=test /tmp/coverage /
|
|
22513
dist/index.js
generated
vendored
22513
dist/index.js
generated
vendored
File diff suppressed because one or more lines are too long
1
dist/index.js.map
generated
vendored
1
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
4054
dist/licenses.txt
generated
vendored
4054
dist/licenses.txt
generated
vendored
File diff suppressed because it is too large
Load Diff
1
dist/sourcemap-register.js
generated
vendored
1
dist/sourcemap-register.js
generated
vendored
File diff suppressed because one or more lines are too long
@ -1,66 +1,42 @@
|
|||||||
target "_common" {
|
|
||||||
args = {
|
|
||||||
BUILDKIT_CONTEXT_KEEP_GIT_DIR = 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
group "default" {
|
group "default" {
|
||||||
targets = ["build"]
|
targets = ["build"]
|
||||||
}
|
}
|
||||||
|
|
||||||
group "pre-checkin" {
|
group "pre-checkin" {
|
||||||
targets = ["vendor", "format", "build"]
|
targets = ["update-yarn", "format", "build"]
|
||||||
}
|
}
|
||||||
|
|
||||||
group "validate" {
|
group "validate" {
|
||||||
targets = ["lint", "build-validate", "vendor-validate"]
|
targets = ["validate-format", "validate-build", "validate-yarn"]
|
||||||
|
}
|
||||||
|
|
||||||
|
target "update-yarn" {
|
||||||
|
target = "update-yarn"
|
||||||
|
output = ["."]
|
||||||
}
|
}
|
||||||
|
|
||||||
target "build" {
|
target "build" {
|
||||||
inherits = ["_common"]
|
target = "dist"
|
||||||
dockerfile = "dev.Dockerfile"
|
|
||||||
target = "build-update"
|
|
||||||
output = ["."]
|
output = ["."]
|
||||||
}
|
}
|
||||||
|
|
||||||
target "build-validate" {
|
|
||||||
inherits = ["_common"]
|
|
||||||
dockerfile = "dev.Dockerfile"
|
|
||||||
target = "build-validate"
|
|
||||||
output = ["type=cacheonly"]
|
|
||||||
}
|
|
||||||
|
|
||||||
target "format" {
|
|
||||||
inherits = ["_common"]
|
|
||||||
dockerfile = "dev.Dockerfile"
|
|
||||||
target = "format-update"
|
|
||||||
output = ["."]
|
|
||||||
}
|
|
||||||
|
|
||||||
target "lint" {
|
|
||||||
inherits = ["_common"]
|
|
||||||
dockerfile = "dev.Dockerfile"
|
|
||||||
target = "lint"
|
|
||||||
output = ["type=cacheonly"]
|
|
||||||
}
|
|
||||||
|
|
||||||
target "vendor" {
|
|
||||||
inherits = ["_common"]
|
|
||||||
dockerfile = "dev.Dockerfile"
|
|
||||||
target = "vendor-update"
|
|
||||||
output = ["."]
|
|
||||||
}
|
|
||||||
|
|
||||||
target "vendor-validate" {
|
|
||||||
inherits = ["_common"]
|
|
||||||
dockerfile = "dev.Dockerfile"
|
|
||||||
target = "vendor-validate"
|
|
||||||
output = ["type=cacheonly"]
|
|
||||||
}
|
|
||||||
|
|
||||||
target "test" {
|
target "test" {
|
||||||
inherits = ["_common"]
|
target = "test"
|
||||||
dockerfile = "dev.Dockerfile"
|
}
|
||||||
target = "test-coverage"
|
|
||||||
output = ["./coverage"]
|
target "format" {
|
||||||
|
target = "format"
|
||||||
|
output = ["."]
|
||||||
|
}
|
||||||
|
|
||||||
|
target "validate-format" {
|
||||||
|
target = "validate-format"
|
||||||
|
}
|
||||||
|
|
||||||
|
target "validate-build" {
|
||||||
|
target = "validate-build"
|
||||||
|
}
|
||||||
|
|
||||||
|
target "validate-yarn" {
|
||||||
|
target = "validate-yarn"
|
||||||
}
|
}
|
||||||
|
12
jest.config.js
Normal file
12
jest.config.js
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
module.exports = {
|
||||||
|
clearMocks: true,
|
||||||
|
moduleFileExtensions: ['js', 'ts'],
|
||||||
|
setupFiles: ["dotenv/config"],
|
||||||
|
testEnvironment: 'node',
|
||||||
|
testMatch: ['**/*.test.ts'],
|
||||||
|
testRunner: 'jest-circus/runner',
|
||||||
|
transform: {
|
||||||
|
'^.+\\.ts$': 'ts-jest'
|
||||||
|
},
|
||||||
|
verbose: false
|
||||||
|
}
|
@ -1,31 +0,0 @@
|
|||||||
import fs from 'fs';
|
|
||||||
import os from 'os';
|
|
||||||
import path from 'path';
|
|
||||||
|
|
||||||
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'docker-metadata-action-'));
|
|
||||||
|
|
||||||
process.env = Object.assign({}, process.env, {
|
|
||||||
TEMP: tmpDir,
|
|
||||||
GITHUB_REPOSITORY: 'docker/metadata-action',
|
|
||||||
RUNNER_TEMP: path.join(tmpDir, 'runner-temp'),
|
|
||||||
RUNNER_TOOL_CACHE: path.join(tmpDir, 'runner-tool-cache')
|
|
||||||
}) as {
|
|
||||||
[key: string]: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
clearMocks: true,
|
|
||||||
testEnvironment: 'node',
|
|
||||||
moduleFileExtensions: ['js', 'ts'],
|
|
||||||
setupFiles: ['dotenv/config'],
|
|
||||||
testMatch: ['**/*.test.ts'],
|
|
||||||
transform: {
|
|
||||||
'^.+\\.ts$': 'ts-jest'
|
|
||||||
},
|
|
||||||
moduleNameMapper: {
|
|
||||||
'^csv-parse/sync': '<rootDir>/node_modules/csv-parse/dist/cjs/sync.cjs'
|
|
||||||
},
|
|
||||||
collectCoverageFrom: ['src/**/{!(main.ts),}.ts'],
|
|
||||||
coveragePathIgnorePatterns: ['lib/', 'node_modules/', '__mocks__/', '__tests__/'],
|
|
||||||
verbose: true
|
|
||||||
};
|
|
66
package.json
66
package.json
@ -1,58 +1,44 @@
|
|||||||
{
|
{
|
||||||
"name": "docker-metadata-action",
|
"name": "docker-meta",
|
||||||
"description": "GitHub Action to extract metadata (tags, labels) for Docker",
|
"description": "GitHub Action to extract metadata (tags, labels) for Docker",
|
||||||
"main": "src/main.ts",
|
"main": "lib/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "ncc build --source-map --minify --license licenses.txt",
|
"build": "tsc && ncc build",
|
||||||
"lint": "yarn run prettier && yarn run eslint",
|
"test": "jest --coverage",
|
||||||
"format": "yarn run prettier:fix && yarn run eslint:fix",
|
"format": "prettier --write **/*.ts",
|
||||||
"eslint": "eslint --max-warnings=0 .",
|
"format-check": "prettier --check **/*.ts",
|
||||||
"eslint:fix": "eslint --fix .",
|
"pre-checkin": "yarn run format && yarn run build"
|
||||||
"prettier": "prettier --check \"./**/*.ts\"",
|
|
||||||
"prettier:fix": "prettier --write \"./**/*.ts\"",
|
|
||||||
"test": "jest"
|
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://github.com/docker/metadata-action.git"
|
"url": "git+https://github.com/crazy-max/ghaction-docker-meta.git"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"actions",
|
"actions",
|
||||||
"docker",
|
"docker",
|
||||||
"metadata",
|
"meta",
|
||||||
"tag",
|
"tag",
|
||||||
"label"
|
"label"
|
||||||
],
|
],
|
||||||
"author": "Docker Inc.",
|
"author": "CrazyMax",
|
||||||
"license": "Apache-2.0",
|
"license": "MIT",
|
||||||
"packageManager": "yarn@3.6.3",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.11.1",
|
"@actions/core": "^1.2.6",
|
||||||
"@actions/github": "^6.0.0",
|
"@actions/github": "^4.0.0",
|
||||||
"@docker/actions-toolkit": "^0.56.0",
|
"handlebars": "^4.7.6",
|
||||||
"@renovate/pep440": "^1.0.0",
|
"moment": "^2.29.1",
|
||||||
"csv-parse": "^5.6.0",
|
"semver": "^7.3.2"
|
||||||
"handlebars": "^4.7.8",
|
|
||||||
"moment": "^2.30.1",
|
|
||||||
"moment-timezone": "^0.5.47",
|
|
||||||
"semver": "^7.7.1"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/csv-parse": "^1.2.2",
|
"@types/jest": "^26.0.0",
|
||||||
"@types/node": "^20.12.12",
|
"@types/node": "^14.11.2",
|
||||||
"@types/semver": "^7.5.8",
|
"@vercel/ncc": "^0.24.1",
|
||||||
"@typescript-eslint/eslint-plugin": "^7.9.0",
|
"dotenv": "^8.2.0",
|
||||||
"@typescript-eslint/parser": "^7.9.0",
|
"jest": "^26.0.1",
|
||||||
"@vercel/ncc": "^0.38.1",
|
"jest-circus": "^26.0.1",
|
||||||
"dotenv": "^16.4.5",
|
"jest-runtime": "^26.0.1",
|
||||||
"eslint": "^8.57.0",
|
"prettier": "^2.0.4",
|
||||||
"eslint-config-prettier": "^9.1.0",
|
"ts-jest": "^26.4.1",
|
||||||
"eslint-plugin-jest": "^28.5.0",
|
"typescript": "^4.0.3"
|
||||||
"eslint-plugin-prettier": "^5.1.3",
|
|
||||||
"jest": "^29.7.0",
|
|
||||||
"prettier": "^3.2.5",
|
|
||||||
"ts-jest": "^29.1.2",
|
|
||||||
"ts-node": "^10.9.2",
|
|
||||||
"typescript": "^5.4.5"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
146
src/context.ts
146
src/context.ts
@ -1,136 +1,46 @@
|
|||||||
import * as core from '@actions/core';
|
import * as core from '@actions/core';
|
||||||
import {Context as GithubContext} from '@actions/github/lib/context';
|
|
||||||
import {Util} from '@docker/actions-toolkit/lib/util';
|
|
||||||
import {Git} from '@docker/actions-toolkit/lib/git';
|
|
||||||
import {GitHub} from '@docker/actions-toolkit/lib/github';
|
|
||||||
import {Toolkit} from '@docker/actions-toolkit/lib/toolkit';
|
|
||||||
|
|
||||||
export interface Context extends GithubContext {
|
|
||||||
commitDate: Date;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Inputs {
|
export interface Inputs {
|
||||||
context: ContextSource;
|
|
||||||
images: string[];
|
images: string[];
|
||||||
tags: string[];
|
tagSha: boolean;
|
||||||
flavor: string[];
|
tagEdge: boolean;
|
||||||
labels: string[];
|
tagEdgeBranch: string;
|
||||||
annotations: string[];
|
tagCoerceTag: string;
|
||||||
|
tagLatestMatch: string;
|
||||||
|
tagSchedule: string;
|
||||||
sepTags: string;
|
sepTags: string;
|
||||||
sepLabels: string;
|
sepLabels: string;
|
||||||
sepAnnotations: string;
|
|
||||||
bakeTarget: string;
|
|
||||||
githubToken: string;
|
githubToken: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getInputs(): Inputs {
|
export function getInputs(): Inputs {
|
||||||
return {
|
return {
|
||||||
context: (core.getInput('context') || ContextSource.workflow) as ContextSource,
|
images: getInputList('images'),
|
||||||
images: Util.getInputList('images', {ignoreComma: true, comment: '#'}),
|
tagSha: /true/i.test(core.getInput('tag-sha') || 'false'),
|
||||||
tags: Util.getInputList('tags', {ignoreComma: true, comment: '#'}),
|
tagEdge: /true/i.test(core.getInput('tag-edge') || 'false'),
|
||||||
flavor: Util.getInputList('flavor', {ignoreComma: true, comment: '#'}),
|
tagEdgeBranch: core.getInput('tag-edge-branch'),
|
||||||
labels: Util.getInputList('labels', {ignoreComma: true, comment: '#'}),
|
tagCoerceTag: core.getInput('tag-coerce-tag'),
|
||||||
annotations: Util.getInputList('annotations', {ignoreComma: true, comment: '#'}),
|
tagLatestMatch: core.getInput('tag-latest-match'),
|
||||||
sepTags: core.getInput('sep-tags', {trimWhitespace: false}) || `\n`,
|
tagSchedule: core.getInput('tag-schedule') || 'nightly',
|
||||||
sepLabels: core.getInput('sep-labels', {trimWhitespace: false}) || `\n`,
|
sepTags: core.getInput('sep-tags') || `\n`,
|
||||||
sepAnnotations: core.getInput('sep-annotations', {trimWhitespace: false}) || `\n`,
|
sepLabels: core.getInput('sep-labels') || `\n`,
|
||||||
bakeTarget: core.getInput('bake-target') || `docker-metadata-action`,
|
|
||||||
githubToken: core.getInput('github-token')
|
githubToken: core.getInput('github-token')
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum ContextSource {
|
export function getInputList(name: string): string[] {
|
||||||
workflow = 'workflow',
|
const items = core.getInput(name);
|
||||||
git = 'git'
|
if (items == '') {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
return items
|
||||||
|
.split(/\r?\n/)
|
||||||
|
.filter(x => x)
|
||||||
|
.reduce<string[]>((acc, line) => acc.concat(line.split(',').filter(x => x)).map(pat => pat.trim()), []);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getContext(source: ContextSource, toolkit: Toolkit): Promise<Context> {
|
export const asyncForEach = async (array, callback) => {
|
||||||
switch (source) {
|
for (let index = 0; index < array.length; index++) {
|
||||||
case ContextSource.workflow:
|
await callback(array[index], index, array);
|
||||||
return await getContextFromWorkflow(toolkit);
|
|
||||||
case ContextSource.git:
|
|
||||||
return await getContextFromGit();
|
|
||||||
default:
|
|
||||||
throw new Error(`Invalid context source: ${source}`);
|
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
async function getContextFromWorkflow(toolkit: Toolkit): Promise<Context> {
|
|
||||||
const context = GitHub.context;
|
|
||||||
|
|
||||||
// Needs to override Git reference with pr ref instead of upstream branch ref
|
|
||||||
// for pull_request_target event
|
|
||||||
// https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target
|
|
||||||
if (/pull_request_target/.test(context.eventName)) {
|
|
||||||
context.ref = `refs/pull/${context.payload.number}/merge`;
|
|
||||||
}
|
|
||||||
|
|
||||||
// DOCKER_METADATA_PR_HEAD_SHA env var can be used to set associated head
|
|
||||||
// SHA instead of commit SHA that triggered the workflow on pull request
|
|
||||||
// event.
|
|
||||||
if (/true/i.test(process.env.DOCKER_METADATA_PR_HEAD_SHA || '')) {
|
|
||||||
if ((/pull_request/.test(context.eventName) || /pull_request_target/.test(context.eventName)) && context.payload?.pull_request?.head?.sha != undefined) {
|
|
||||||
context.sha = context.payload.pull_request.head.sha;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
|
||||||
commitDate: await getCommitDateFromWorkflow(context.sha, toolkit),
|
|
||||||
...context
|
|
||||||
} as Context;
|
|
||||||
}
|
|
||||||
|
|
||||||
async function getContextFromGit(): Promise<Context> {
|
|
||||||
const ctx = await Git.context();
|
|
||||||
|
|
||||||
return {
|
|
||||||
commitDate: await Git.commitDate(ctx.sha),
|
|
||||||
...ctx
|
|
||||||
} as Context;
|
|
||||||
}
|
|
||||||
|
|
||||||
async function getCommitDateFromWorkflow(sha: string, toolkit: Toolkit): Promise<Date> {
|
|
||||||
const event = GitHub.context.payload as unknown as {
|
|
||||||
// branch push
|
|
||||||
commits?: Array<{
|
|
||||||
timestamp: string;
|
|
||||||
// commit sha
|
|
||||||
id: string;
|
|
||||||
}>;
|
|
||||||
// tags
|
|
||||||
head_commit?: {
|
|
||||||
timestamp: string;
|
|
||||||
// commit sha
|
|
||||||
id: string;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
if (event.commits) {
|
|
||||||
const commitDate = event.commits.find(x => x.id === sha)?.timestamp;
|
|
||||||
if (commitDate) {
|
|
||||||
return new Date(commitDate);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (event.head_commit) {
|
|
||||||
if (event.head_commit.id === sha) {
|
|
||||||
return new Date(event.head_commit.timestamp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// fallback to github api for commit date
|
|
||||||
try {
|
|
||||||
const commit = await toolkit.github.octokit.rest.repos.getCommit({
|
|
||||||
owner: GitHub.context.repo.owner,
|
|
||||||
repo: GitHub.context.repo.repo,
|
|
||||||
ref: sha
|
|
||||||
});
|
|
||||||
if (commit.data.commit.committer?.date) {
|
|
||||||
return new Date(commit.data.commit.committer.date);
|
|
||||||
}
|
|
||||||
throw new Error('Committer date not found');
|
|
||||||
} catch (error) {
|
|
||||||
core.debug(`Failed to get commit date from GitHub API: ${error.message}`);
|
|
||||||
return new Date();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -1,87 +0,0 @@
|
|||||||
import {parse} from 'csv-parse/sync';
|
|
||||||
import * as core from '@actions/core';
|
|
||||||
|
|
||||||
export interface Flavor {
|
|
||||||
latest: string;
|
|
||||||
prefix: string;
|
|
||||||
prefixLatest: boolean;
|
|
||||||
suffix: string;
|
|
||||||
suffixLatest: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function Transform(inputs: string[]): Flavor {
|
|
||||||
const flavor: Flavor = {
|
|
||||||
latest: 'auto',
|
|
||||||
prefix: '',
|
|
||||||
prefixLatest: false,
|
|
||||||
suffix: '',
|
|
||||||
suffixLatest: false
|
|
||||||
};
|
|
||||||
|
|
||||||
for (const input of inputs) {
|
|
||||||
const fields = parse(input, {
|
|
||||||
relaxColumnCount: true,
|
|
||||||
skipEmptyLines: true
|
|
||||||
})[0];
|
|
||||||
let onlatestfor = '';
|
|
||||||
for (const field of fields) {
|
|
||||||
const parts = field
|
|
||||||
.toString()
|
|
||||||
.split('=')
|
|
||||||
.map(item => item.trim());
|
|
||||||
if (parts.length == 1) {
|
|
||||||
throw new Error(`Invalid flavor entry: ${input}`);
|
|
||||||
}
|
|
||||||
const key = parts[0].toLowerCase();
|
|
||||||
const value = parts[1];
|
|
||||||
switch (key) {
|
|
||||||
case 'latest': {
|
|
||||||
flavor.latest = value;
|
|
||||||
if (!['auto', 'true', 'false'].includes(flavor.latest)) {
|
|
||||||
throw new Error(`Invalid latest flavor entry: ${input}`);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'prefix': {
|
|
||||||
flavor.prefix = value;
|
|
||||||
onlatestfor = 'prefix';
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'suffix': {
|
|
||||||
flavor.suffix = value;
|
|
||||||
onlatestfor = 'suffix';
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'onlatest': {
|
|
||||||
if (!['true', 'false'].includes(value)) {
|
|
||||||
throw new Error(`Invalid value for onlatest attribute: ${value}`);
|
|
||||||
}
|
|
||||||
switch (onlatestfor) {
|
|
||||||
case 'prefix': {
|
|
||||||
flavor.prefixLatest = /true/i.test(value);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'suffix': {
|
|
||||||
flavor.suffixLatest = /true/i.test(value);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default: {
|
|
||||||
throw new Error(`Unknown flavor entry: ${input}`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
core.startGroup(`Processing flavor input`);
|
|
||||||
core.info(`latest=${flavor.latest}`);
|
|
||||||
core.info(`prefix=${flavor.prefix}`);
|
|
||||||
core.info(`prefixLatest=${flavor.prefixLatest}`);
|
|
||||||
core.info(`suffix=${flavor.suffix}`);
|
|
||||||
core.info(`suffixLatest=${flavor.suffixLatest}`);
|
|
||||||
core.endGroup();
|
|
||||||
|
|
||||||
return flavor;
|
|
||||||
}
|
|
18
src/github.ts
Normal file
18
src/github.ts
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import * as github from '@actions/github';
|
||||||
|
import {Context} from '@actions/github/lib/context';
|
||||||
|
import {ReposGetResponseData} from '@octokit/types';
|
||||||
|
|
||||||
|
export function context(): Context {
|
||||||
|
return github.context;
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function repo(token: string): Promise<ReposGetResponseData> {
|
||||||
|
const octokit = github.getOctokit(token);
|
||||||
|
const repo = await octokit.repos.get({
|
||||||
|
...github.context.repo
|
||||||
|
});
|
||||||
|
if (!repo?.data) {
|
||||||
|
throw new Error('Cannot get GitHub repository');
|
||||||
|
}
|
||||||
|
return repo.data;
|
||||||
|
}
|
86
src/image.ts
86
src/image.ts
@ -1,86 +0,0 @@
|
|||||||
import {parse} from 'csv-parse/sync';
|
|
||||||
import * as core from '@actions/core';
|
|
||||||
|
|
||||||
export interface Image {
|
|
||||||
name: string;
|
|
||||||
enable: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function Transform(inputs: string[]): Image[] {
|
|
||||||
let images: Image[] = [];
|
|
||||||
|
|
||||||
// backward compatibility with old format
|
|
||||||
if (inputs.length == 1) {
|
|
||||||
let newformat = false;
|
|
||||||
const fields = parse(inputs[0], {
|
|
||||||
relaxColumnCount: true,
|
|
||||||
skipEmptyLines: true
|
|
||||||
})[0];
|
|
||||||
for (const field of fields) {
|
|
||||||
const parts = field
|
|
||||||
.toString()
|
|
||||||
.split('=')
|
|
||||||
.map(item => item.trim());
|
|
||||||
if (parts.length == 1) {
|
|
||||||
images.push({name: parts[0], enable: true});
|
|
||||||
} else {
|
|
||||||
newformat = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!newformat) {
|
|
||||||
return output(images);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
images = [];
|
|
||||||
for (const input of inputs) {
|
|
||||||
const image: Image = {name: '', enable: true};
|
|
||||||
const fields = parse(input, {
|
|
||||||
relaxColumnCount: true,
|
|
||||||
skipEmptyLines: true
|
|
||||||
})[0];
|
|
||||||
for (const field of fields) {
|
|
||||||
const parts = field
|
|
||||||
.toString()
|
|
||||||
.split('=')
|
|
||||||
.map(item => item.trim());
|
|
||||||
if (parts.length == 1) {
|
|
||||||
image.name = parts[0];
|
|
||||||
} else {
|
|
||||||
const key = parts[0].toLowerCase();
|
|
||||||
const value = parts[1];
|
|
||||||
switch (key) {
|
|
||||||
case 'name': {
|
|
||||||
image.name = value;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'enable': {
|
|
||||||
if (!['true', 'false'].includes(value)) {
|
|
||||||
throw new Error(`Invalid enable attribute value: ${input}`);
|
|
||||||
}
|
|
||||||
image.enable = /true/i.test(value);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default: {
|
|
||||||
throw new Error(`Unknown image attribute: ${input}`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (image.name.length == 0) {
|
|
||||||
throw new Error(`Image name attribute empty: ${input}`);
|
|
||||||
}
|
|
||||||
images.push(image);
|
|
||||||
}
|
|
||||||
return output(images);
|
|
||||||
}
|
|
||||||
|
|
||||||
function output(images: Image[]): Image[] {
|
|
||||||
core.startGroup(`Processing images input`);
|
|
||||||
for (const image of images) {
|
|
||||||
core.info(`name=${image.name},enable=${image.enable}`);
|
|
||||||
}
|
|
||||||
core.endGroup();
|
|
||||||
return images;
|
|
||||||
}
|
|
152
src/main.ts
152
src/main.ts
@ -1,120 +1,56 @@
|
|||||||
import * as fs from 'fs';
|
import {getInputs, Inputs} from './context';
|
||||||
import * as core from '@actions/core';
|
import * as github from './github';
|
||||||
import * as actionsToolkit from '@docker/actions-toolkit';
|
|
||||||
import {Toolkit} from '@docker/actions-toolkit/lib/toolkit';
|
|
||||||
import {Util} from '@docker/actions-toolkit/lib/util';
|
|
||||||
|
|
||||||
import {getContext, getInputs, Inputs} from './context';
|
|
||||||
import {Meta, Version} from './meta';
|
import {Meta, Version} from './meta';
|
||||||
|
import * as core from '@actions/core';
|
||||||
|
import {Context} from '@actions/github/lib/context';
|
||||||
|
import {ReposGetResponseData} from '@octokit/types';
|
||||||
|
|
||||||
actionsToolkit.run(
|
async function run() {
|
||||||
// main
|
try {
|
||||||
async () => {
|
const inputs: Inputs = await getInputs();
|
||||||
const inputs: Inputs = getInputs();
|
if (inputs.images.length == 0) {
|
||||||
const toolkit = new Toolkit({githubToken: inputs.githubToken});
|
throw new Error(`images input required`);
|
||||||
const context = await getContext(inputs.context, toolkit);
|
|
||||||
const repo = await toolkit.github.repoData();
|
|
||||||
const setOutput = outputEnvEnabled() ? setOutputAndEnv : core.setOutput;
|
|
||||||
|
|
||||||
await core.group(`Context info`, async () => {
|
|
||||||
core.info(`eventName: ${context.eventName}`);
|
|
||||||
core.info(`sha: ${context.sha}`);
|
|
||||||
core.info(`ref: ${context.ref}`);
|
|
||||||
core.info(`workflow: ${context.workflow}`);
|
|
||||||
core.info(`action: ${context.action}`);
|
|
||||||
core.info(`actor: ${context.actor}`);
|
|
||||||
core.info(`runNumber: ${context.runNumber}`);
|
|
||||||
core.info(`runId: ${context.runId}`);
|
|
||||||
core.info(`commitDate: ${context.commitDate}`);
|
|
||||||
});
|
|
||||||
|
|
||||||
if (core.isDebug()) {
|
|
||||||
await core.group(`Webhook payload`, async () => {
|
|
||||||
core.info(JSON.stringify(context.payload, null, 2));
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const context: Context = github.context();
|
||||||
|
const repo: ReposGetResponseData = await github.repo(inputs.githubToken);
|
||||||
|
core.startGroup(`Context info`);
|
||||||
|
core.info(`eventName: ${context.eventName}`);
|
||||||
|
core.info(`sha: ${context.sha}`);
|
||||||
|
core.info(`ref: ${context.ref}`);
|
||||||
|
core.info(`workflow: ${context.workflow}`);
|
||||||
|
core.info(`action: ${context.action}`);
|
||||||
|
core.info(`actor: ${context.actor}`);
|
||||||
|
core.info(`runNumber: ${context.runNumber}`);
|
||||||
|
core.info(`runId: ${context.runId}`);
|
||||||
|
core.endGroup();
|
||||||
|
|
||||||
const meta: Meta = new Meta(inputs, context, repo);
|
const meta: Meta = new Meta(inputs, context, repo);
|
||||||
|
|
||||||
const version: Version = meta.version;
|
const version: Version = meta.version();
|
||||||
if (meta.version.main == undefined || meta.version.main.length == 0) {
|
core.startGroup(`Docker image version`);
|
||||||
core.warning(`No Docker image version has been generated. Check tags input.`);
|
core.info(version.version || '');
|
||||||
} else {
|
core.endGroup();
|
||||||
await core.group(`Docker image version`, async () => {
|
core.setOutput('version', version.version || '');
|
||||||
core.info(version.main || '');
|
|
||||||
});
|
const tags: Array<string> = meta.tags();
|
||||||
|
core.startGroup(`Docker tags`);
|
||||||
|
for (let tag of tags) {
|
||||||
|
core.info(tag);
|
||||||
}
|
}
|
||||||
setOutput('version', version.main || '');
|
core.endGroup();
|
||||||
|
core.setOutput('tags', tags.join(inputs.sepTags));
|
||||||
|
|
||||||
// Docker tags
|
const labels: Array<string> = meta.labels();
|
||||||
const tags: Array<string> = meta.getTags();
|
core.startGroup(`Docker labels`);
|
||||||
if (tags.length == 0) {
|
for (let label of labels) {
|
||||||
core.warning('No Docker tag has been generated. Check tags input.');
|
core.info(label);
|
||||||
} else {
|
|
||||||
await core.group(`Docker tags`, async () => {
|
|
||||||
for (const tag of tags) {
|
|
||||||
core.info(tag);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
setOutput('tags', tags.join(inputs.sepTags));
|
core.endGroup();
|
||||||
|
core.setOutput('labels', labels.join(inputs.sepTags));
|
||||||
// Docker labels
|
} catch (error) {
|
||||||
const labels: Array<string> = meta.getLabels();
|
core.setFailed(error.message);
|
||||||
await core.group(`Docker labels`, async () => {
|
|
||||||
for (const label of labels) {
|
|
||||||
core.info(label);
|
|
||||||
}
|
|
||||||
setOutput('labels', labels.join(inputs.sepLabels));
|
|
||||||
});
|
|
||||||
|
|
||||||
// Annotations
|
|
||||||
const annotationsRaw: Array<string> = meta.getAnnotations();
|
|
||||||
const annotationsLevels = process.env.DOCKER_METADATA_ANNOTATIONS_LEVELS || 'manifest';
|
|
||||||
await core.group(`Annotations`, async () => {
|
|
||||||
const annotations: Array<string> = [];
|
|
||||||
for (const level of annotationsLevels.split(',')) {
|
|
||||||
annotations.push(
|
|
||||||
...annotationsRaw.map(label => {
|
|
||||||
const v = `${level}:${label}`;
|
|
||||||
core.info(v);
|
|
||||||
return v;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
setOutput(`annotations`, annotations.join(inputs.sepAnnotations));
|
|
||||||
});
|
|
||||||
|
|
||||||
// JSON
|
|
||||||
const jsonOutput = meta.getJSON(annotationsLevels.split(','));
|
|
||||||
await core.group(`JSON output`, async () => {
|
|
||||||
core.info(JSON.stringify(jsonOutput, null, 2));
|
|
||||||
setOutput('json', JSON.stringify(jsonOutput));
|
|
||||||
});
|
|
||||||
|
|
||||||
// Bake files
|
|
||||||
for (const kind of ['tags', 'labels', 'annotations:' + annotationsLevels]) {
|
|
||||||
const outputName = kind.split(':')[0];
|
|
||||||
const bakeFile: string = meta.getBakeFile(kind);
|
|
||||||
await core.group(`Bake file definition (${outputName})`, async () => {
|
|
||||||
core.info(fs.readFileSync(bakeFile, 'utf8'));
|
|
||||||
setOutput(`bake-file-${outputName}`, bakeFile);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// Bake file with tags and labels
|
|
||||||
setOutput(`bake-file`, `${meta.getBakeFileTagsLabels()}`);
|
|
||||||
}
|
}
|
||||||
);
|
|
||||||
|
|
||||||
function setOutputAndEnv(name: string, value: string) {
|
|
||||||
core.setOutput(name, value);
|
|
||||||
core.exportVariable(`DOCKER_METADATA_OUTPUT_${name.replace(/\W/g, '_').toUpperCase()}`, value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function outputEnvEnabled(): boolean {
|
run();
|
||||||
if (process.env.DOCKER_METADATA_SET_OUTPUT_ENV) {
|
|
||||||
return Util.parseBool(process.env.DOCKER_METADATA_SET_OUTPUT_ENV);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
661
src/meta.ts
661
src/meta.ts
@ -1,643 +1,110 @@
|
|||||||
import * as handlebars from 'handlebars';
|
import * as handlebars from 'handlebars';
|
||||||
import * as fs from 'fs';
|
import * as moment from 'moment';
|
||||||
import * as path from 'path';
|
|
||||||
import moment from 'moment-timezone';
|
|
||||||
import * as pep440 from '@renovate/pep440';
|
|
||||||
import * as semver from 'semver';
|
import * as semver from 'semver';
|
||||||
import * as core from '@actions/core';
|
import {Inputs} from './context';
|
||||||
import {Context as ToolkitContext} from '@docker/actions-toolkit/lib/context';
|
import {Context} from '@actions/github/lib/context';
|
||||||
import {GitHubRepo} from '@docker/actions-toolkit/lib/types/github';
|
import {ReposGetResponseData} from '@octokit/types';
|
||||||
|
|
||||||
import {Inputs, Context} from './context';
|
|
||||||
import * as icl from './image';
|
|
||||||
import * as tcl from './tag';
|
|
||||||
import * as fcl from './flavor';
|
|
||||||
|
|
||||||
const defaultShortShaLength = 7;
|
|
||||||
|
|
||||||
export interface Version {
|
export interface Version {
|
||||||
main: string | undefined;
|
version: string | undefined;
|
||||||
partial: string[];
|
latest: boolean;
|
||||||
latest: boolean | undefined;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export class Meta {
|
export class Meta {
|
||||||
public readonly version: Version;
|
|
||||||
|
|
||||||
private readonly inputs: Inputs;
|
private readonly inputs: Inputs;
|
||||||
private readonly context: Context;
|
private readonly context: Context;
|
||||||
private readonly repo: GitHubRepo;
|
private readonly repo: ReposGetResponseData;
|
||||||
private readonly images: icl.Image[];
|
|
||||||
private readonly tags: tcl.Tag[];
|
|
||||||
private readonly flavor: fcl.Flavor;
|
|
||||||
private readonly date: Date;
|
private readonly date: Date;
|
||||||
|
|
||||||
constructor(inputs: Inputs, context: Context, repo: GitHubRepo) {
|
constructor(inputs: Inputs, context: Context, repo: ReposGetResponseData) {
|
||||||
this.inputs = inputs;
|
this.inputs = inputs;
|
||||||
|
if (!this.inputs.tagEdgeBranch) {
|
||||||
|
this.inputs.tagEdgeBranch = repo.default_branch;
|
||||||
|
}
|
||||||
this.context = context;
|
this.context = context;
|
||||||
this.repo = repo;
|
this.repo = repo;
|
||||||
this.images = icl.Transform(inputs.images);
|
|
||||||
this.tags = tcl.Transform(inputs.tags);
|
|
||||||
this.flavor = fcl.Transform(inputs.flavor);
|
|
||||||
this.date = new Date();
|
this.date = new Date();
|
||||||
this.version = this.getVersion();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private getVersion(): Version {
|
public version(): Version {
|
||||||
let version: Version = {
|
const currentDate = this.date;
|
||||||
main: undefined,
|
const version: Version = {
|
||||||
partial: [],
|
version: undefined,
|
||||||
latest: undefined
|
latest: false
|
||||||
};
|
};
|
||||||
|
|
||||||
for (const tag of this.tags) {
|
if (/schedule/.test(this.context.eventName)) {
|
||||||
const enabled = this.setGlobalExp(tag.attrs['enable']);
|
version.version = handlebars.compile(this.inputs.tagSchedule)({
|
||||||
if (!['true', 'false'].includes(enabled)) {
|
date: function (format) {
|
||||||
throw new Error(`Invalid value for enable attribute: ${enabled}`);
|
return moment(currentDate).utc().format(format);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else if (/^refs\/tags\//.test(this.context.ref)) {
|
||||||
|
const tag = this.context.ref.replace(/^refs\/tags\//g, '').replace(/\//g, '-');
|
||||||
|
const sver = semver.clean(tag);
|
||||||
|
if (this.inputs.tagCoerceTag) {
|
||||||
|
const coerce = semver.coerce(tag);
|
||||||
|
if (coerce) {
|
||||||
|
version.version = handlebars.compile(this.inputs.tagCoerceTag)(coerce);
|
||||||
|
version.latest = true;
|
||||||
|
} else if (sver) {
|
||||||
|
version.version = sver;
|
||||||
|
version.latest = true;
|
||||||
|
} else {
|
||||||
|
version.version = tag;
|
||||||
|
}
|
||||||
|
} else if (sver) {
|
||||||
|
version.version = sver;
|
||||||
|
version.latest = true;
|
||||||
|
} else {
|
||||||
|
version.version = tag;
|
||||||
}
|
}
|
||||||
if (!/true/i.test(enabled)) {
|
} else if (/^refs\/heads\//.test(this.context.ref)) {
|
||||||
continue;
|
version.version = this.context.ref.replace(/^refs\/heads\//g, '').replace(/\//g, '-');
|
||||||
}
|
if (this.inputs.tagEdge && this.inputs.tagEdgeBranch === version.version) {
|
||||||
switch (tag.type) {
|
version.version = 'edge';
|
||||||
case tcl.Type.Schedule: {
|
|
||||||
version = this.procSchedule(version, tag);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case tcl.Type.Semver: {
|
|
||||||
version = this.procSemver(version, tag);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case tcl.Type.Pep440: {
|
|
||||||
version = this.procPep440(version, tag);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case tcl.Type.Match: {
|
|
||||||
version = this.procMatch(version, tag);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case tcl.Type.Ref: {
|
|
||||||
if (tag.attrs['event'] == tcl.RefEvent.Branch) {
|
|
||||||
version = this.procRefBranch(version, tag);
|
|
||||||
} else if (tag.attrs['event'] == tcl.RefEvent.Tag) {
|
|
||||||
version = this.procRefTag(version, tag);
|
|
||||||
} else if (tag.attrs['event'] == tcl.RefEvent.PR) {
|
|
||||||
version = this.procRefPr(version, tag);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case tcl.Type.Edge: {
|
|
||||||
version = this.procEdge(version, tag);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case tcl.Type.Raw: {
|
|
||||||
version = this.procRaw(version, tag);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case tcl.Type.Sha: {
|
|
||||||
version = this.procSha(version, tag);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
} else if (/^refs\/pull\//.test(this.context.ref)) {
|
||||||
|
version.version = `pr-${this.context.ref.replace(/^refs\/pull\//g, '').replace(/\/merge$/g, '')}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
version.partial = version.partial.filter((item, index) => version.partial.indexOf(item) === index);
|
if (this.inputs.tagLatestMatch) {
|
||||||
if (version.latest == undefined) {
|
const match = version.version?.match(new RegExp(this.inputs.tagLatestMatch));
|
||||||
version.latest = false;
|
version.latest = match !== null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return version;
|
return version;
|
||||||
}
|
}
|
||||||
|
|
||||||
private procSchedule(version: Version, tag: tcl.Tag): Version {
|
public tags(): Array<string> {
|
||||||
if (!/schedule/.test(this.context.eventName)) {
|
const version: Version = this.version();
|
||||||
return version;
|
if (!version.version) {
|
||||||
}
|
|
||||||
|
|
||||||
const currentDate = this.date;
|
|
||||||
const commitDate = this.context.commitDate;
|
|
||||||
const vraw = this.setValue(
|
|
||||||
handlebars.compile(tag.attrs['pattern'])({
|
|
||||||
date: function (format, options) {
|
|
||||||
const m = moment(currentDate);
|
|
||||||
let tz = 'UTC';
|
|
||||||
Object.keys(options.hash).forEach(key => {
|
|
||||||
switch (key) {
|
|
||||||
case 'tz':
|
|
||||||
tz = options.hash[key];
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
throw new Error(`Unknown ${key} attribute`);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return m.tz(tz).format(format);
|
|
||||||
},
|
|
||||||
commit_date: function (format, options) {
|
|
||||||
const m = moment(commitDate);
|
|
||||||
let tz = 'UTC';
|
|
||||||
Object.keys(options.hash).forEach(key => {
|
|
||||||
switch (key) {
|
|
||||||
case 'tz':
|
|
||||||
tz = options.hash[key];
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
throw new Error(`Unknown ${key} attribute`);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return m.tz(tz).format(format);
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
tag
|
|
||||||
);
|
|
||||||
|
|
||||||
return Meta.setVersion(version, vraw, this.flavor.latest == 'auto' ? false : this.flavor.latest == 'true');
|
|
||||||
}
|
|
||||||
|
|
||||||
private procSemver(version: Version, tag: tcl.Tag): Version {
|
|
||||||
if (!/^refs\/tags\//.test(this.context.ref) && tag.attrs['value'].length == 0) {
|
|
||||||
return version;
|
|
||||||
}
|
|
||||||
|
|
||||||
let vraw: string;
|
|
||||||
if (tag.attrs['value'].length > 0) {
|
|
||||||
vraw = this.setGlobalExp(tag.attrs['value']);
|
|
||||||
} else {
|
|
||||||
vraw = this.context.ref.replace(/^refs\/tags\//g, '').replace(/\//g, '-');
|
|
||||||
}
|
|
||||||
if (!semver.valid(vraw)) {
|
|
||||||
core.warning(`${vraw} is not a valid semver. More info: https://semver.org/`);
|
|
||||||
return version;
|
|
||||||
}
|
|
||||||
|
|
||||||
let latest = false;
|
|
||||||
const sver = semver.parse(vraw, {
|
|
||||||
loose: true
|
|
||||||
});
|
|
||||||
if (semver.prerelease(vraw)) {
|
|
||||||
if (Meta.isRawStatement(tag.attrs['pattern'])) {
|
|
||||||
vraw = this.setValue(handlebars.compile(tag.attrs['pattern'])(sver), tag);
|
|
||||||
} else {
|
|
||||||
vraw = this.setValue(handlebars.compile('{{version}}')(sver), tag);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
vraw = this.setValue(handlebars.compile(tag.attrs['pattern'])(sver), tag);
|
|
||||||
latest = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return Meta.setVersion(version, vraw, this.flavor.latest == 'auto' ? latest : this.flavor.latest == 'true');
|
|
||||||
}
|
|
||||||
|
|
||||||
private procPep440(version: Version, tag: tcl.Tag): Version {
|
|
||||||
if (!/^refs\/tags\//.test(this.context.ref) && tag.attrs['value'].length == 0) {
|
|
||||||
return version;
|
|
||||||
}
|
|
||||||
|
|
||||||
let vraw: string;
|
|
||||||
if (tag.attrs['value'].length > 0) {
|
|
||||||
vraw = this.setGlobalExp(tag.attrs['value']);
|
|
||||||
} else {
|
|
||||||
vraw = this.context.ref.replace(/^refs\/tags\//g, '').replace(/\//g, '-');
|
|
||||||
}
|
|
||||||
if (!pep440.valid(vraw)) {
|
|
||||||
core.warning(`${vraw} does not conform to PEP 440. More info: https://www.python.org/dev/peps/pep-0440`);
|
|
||||||
return version;
|
|
||||||
}
|
|
||||||
|
|
||||||
let latest = false;
|
|
||||||
const pver = pep440.explain(vraw);
|
|
||||||
if (pver.is_prerelease || pver.is_postrelease || pver.is_devrelease) {
|
|
||||||
if (Meta.isRawStatement(tag.attrs['pattern'])) {
|
|
||||||
vraw = this.setValue(vraw, tag);
|
|
||||||
} else {
|
|
||||||
vraw = this.setValue(pep440.clean(vraw), tag);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
vraw = this.setValue(
|
|
||||||
handlebars.compile(tag.attrs['pattern'])({
|
|
||||||
raw: function () {
|
|
||||||
return vraw;
|
|
||||||
},
|
|
||||||
version: function () {
|
|
||||||
return pep440.clean(vraw);
|
|
||||||
},
|
|
||||||
major: function () {
|
|
||||||
return pep440.major(vraw);
|
|
||||||
},
|
|
||||||
minor: function () {
|
|
||||||
return pep440.minor(vraw);
|
|
||||||
},
|
|
||||||
patch: function () {
|
|
||||||
return pep440.patch(vraw);
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
tag
|
|
||||||
);
|
|
||||||
latest = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return Meta.setVersion(version, vraw, this.flavor.latest == 'auto' ? latest : this.flavor.latest == 'true');
|
|
||||||
}
|
|
||||||
|
|
||||||
private procMatch(version: Version, tag: tcl.Tag): Version {
|
|
||||||
if (!/^refs\/tags\//.test(this.context.ref) && tag.attrs['value'].length == 0) {
|
|
||||||
return version;
|
|
||||||
}
|
|
||||||
|
|
||||||
let vraw: string;
|
|
||||||
if (tag.attrs['value'].length > 0) {
|
|
||||||
vraw = this.setGlobalExp(tag.attrs['value']);
|
|
||||||
} else {
|
|
||||||
vraw = this.context.ref.replace(/^refs\/tags\//g, '');
|
|
||||||
}
|
|
||||||
|
|
||||||
let tmatch;
|
|
||||||
const isRegEx = tag.attrs['pattern'].match(/^\/(.+)\/(.*)$/);
|
|
||||||
if (isRegEx) {
|
|
||||||
tmatch = vraw.match(new RegExp(isRegEx[1], isRegEx[2]));
|
|
||||||
} else {
|
|
||||||
tmatch = vraw.match(tag.attrs['pattern']);
|
|
||||||
}
|
|
||||||
if (!tmatch) {
|
|
||||||
core.warning(`${tag.attrs['pattern']} does not match ${vraw}.`);
|
|
||||||
return version;
|
|
||||||
}
|
|
||||||
if (typeof tmatch[tag.attrs['group']] === 'undefined') {
|
|
||||||
core.warning(`Group ${tag.attrs['group']} does not exist for ${tag.attrs['pattern']} pattern.`);
|
|
||||||
return version;
|
|
||||||
}
|
|
||||||
|
|
||||||
vraw = this.setValue(tmatch[tag.attrs['group']], tag);
|
|
||||||
return Meta.setVersion(version, vraw, this.flavor.latest == 'auto' ? true : this.flavor.latest == 'true');
|
|
||||||
}
|
|
||||||
|
|
||||||
private procRefBranch(version: Version, tag: tcl.Tag): Version {
|
|
||||||
if (!/^refs\/heads\//.test(this.context.ref)) {
|
|
||||||
return version;
|
|
||||||
}
|
|
||||||
const vraw = this.setValue(this.context.ref.replace(/^refs\/heads\//g, ''), tag);
|
|
||||||
return Meta.setVersion(version, vraw, this.flavor.latest == 'auto' ? false : this.flavor.latest == 'true');
|
|
||||||
}
|
|
||||||
|
|
||||||
private procRefTag(version: Version, tag: tcl.Tag): Version {
|
|
||||||
if (!/^refs\/tags\//.test(this.context.ref)) {
|
|
||||||
return version;
|
|
||||||
}
|
|
||||||
const vraw = this.setValue(this.context.ref.replace(/^refs\/tags\//g, ''), tag);
|
|
||||||
return Meta.setVersion(version, vraw, this.flavor.latest == 'auto' ? true : this.flavor.latest == 'true');
|
|
||||||
}
|
|
||||||
|
|
||||||
private procRefPr(version: Version, tag: tcl.Tag): Version {
|
|
||||||
if (!/^refs\/pull\//.test(this.context.ref)) {
|
|
||||||
return version;
|
|
||||||
}
|
|
||||||
|
|
||||||
const vraw = this.setValue(this.context.ref.replace(/^refs\/pull\//g, '').replace(/\/merge$/g, ''), tag);
|
|
||||||
return Meta.setVersion(version, vraw, this.flavor.latest == 'auto' ? false : this.flavor.latest == 'true');
|
|
||||||
}
|
|
||||||
|
|
||||||
private procEdge(version: Version, tag: tcl.Tag): Version {
|
|
||||||
if (!/^refs\/heads\//.test(this.context.ref)) {
|
|
||||||
return version;
|
|
||||||
}
|
|
||||||
|
|
||||||
const val = this.context.ref.replace(/^refs\/heads\//g, '');
|
|
||||||
if (tag.attrs['branch'].length == 0) {
|
|
||||||
tag.attrs['branch'] = this.repo.default_branch;
|
|
||||||
}
|
|
||||||
if (tag.attrs['branch'] != val) {
|
|
||||||
return version;
|
|
||||||
}
|
|
||||||
|
|
||||||
const vraw = this.setValue('edge', tag);
|
|
||||||
return Meta.setVersion(version, vraw, this.flavor.latest == 'auto' ? false : this.flavor.latest == 'true');
|
|
||||||
}
|
|
||||||
|
|
||||||
private procRaw(version: Version, tag: tcl.Tag): Version {
|
|
||||||
const vraw = this.setValue(this.setGlobalExp(tag.attrs['value']), tag);
|
|
||||||
return Meta.setVersion(version, vraw, this.flavor.latest == 'auto' ? false : this.flavor.latest == 'true');
|
|
||||||
}
|
|
||||||
|
|
||||||
private procSha(version: Version, tag: tcl.Tag): Version {
|
|
||||||
if (!this.context.sha) {
|
|
||||||
return version;
|
|
||||||
}
|
|
||||||
|
|
||||||
let val = this.context.sha;
|
|
||||||
if (tag.attrs['format'] === tcl.ShaFormat.Short) {
|
|
||||||
val = Meta.shortSha(this.context.sha);
|
|
||||||
}
|
|
||||||
|
|
||||||
const vraw = this.setValue(val, tag);
|
|
||||||
return Meta.setVersion(version, vraw, this.flavor.latest == 'auto' ? false : this.flavor.latest == 'true');
|
|
||||||
}
|
|
||||||
|
|
||||||
private static setVersion(version: Version, val: string, latest: boolean): Version {
|
|
||||||
if (val.length == 0) {
|
|
||||||
return version;
|
|
||||||
}
|
|
||||||
val = Meta.sanitizeTag(val);
|
|
||||||
if (version.main == undefined) {
|
|
||||||
version.main = val;
|
|
||||||
} else if (val !== version.main) {
|
|
||||||
version.partial.push(val);
|
|
||||||
}
|
|
||||||
if (version.latest == undefined) {
|
|
||||||
version.latest = latest;
|
|
||||||
}
|
|
||||||
return version;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static isRawStatement(pattern: string): boolean {
|
|
||||||
try {
|
|
||||||
const hp = handlebars.parseWithoutProcessing(pattern);
|
|
||||||
if (hp.body.length == 1 && hp.body[0].type == 'MustacheStatement') {
|
|
||||||
return hp.body[0]['path']['parts'].length == 1 && hp.body[0]['path']['parts'][0] == 'raw';
|
|
||||||
}
|
|
||||||
} catch (err) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private setValue(val: string, tag: tcl.Tag): string {
|
|
||||||
if (Object.prototype.hasOwnProperty.call(tag.attrs, 'prefix')) {
|
|
||||||
val = `${this.setGlobalExp(tag.attrs['prefix'])}${val}`;
|
|
||||||
} else if (this.flavor.prefix.length > 0) {
|
|
||||||
val = `${this.setGlobalExp(this.flavor.prefix)}${val}`;
|
|
||||||
}
|
|
||||||
if (Object.prototype.hasOwnProperty.call(tag.attrs, 'suffix')) {
|
|
||||||
val = `${val}${this.setGlobalExp(tag.attrs['suffix'])}`;
|
|
||||||
} else if (this.flavor.suffix.length > 0) {
|
|
||||||
val = `${val}${this.setGlobalExp(this.flavor.suffix)}`;
|
|
||||||
}
|
|
||||||
return val;
|
|
||||||
}
|
|
||||||
|
|
||||||
private setGlobalExp(val: string): string {
|
|
||||||
const context = this.context;
|
|
||||||
const currentDate = this.date;
|
|
||||||
const commitDate = this.context.commitDate;
|
|
||||||
return handlebars.compile(val)({
|
|
||||||
branch: function () {
|
|
||||||
if (!/^refs\/heads\//.test(context.ref)) {
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
return context.ref.replace(/^refs\/heads\//g, '');
|
|
||||||
},
|
|
||||||
tag: function () {
|
|
||||||
if (!/^refs\/tags\//.test(context.ref)) {
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
return context.ref.replace(/^refs\/tags\//g, '');
|
|
||||||
},
|
|
||||||
sha: function () {
|
|
||||||
return Meta.shortSha(context.sha);
|
|
||||||
},
|
|
||||||
base_ref: function () {
|
|
||||||
if (/^refs\/tags\//.test(context.ref) && context.payload?.base_ref != undefined) {
|
|
||||||
return context.payload.base_ref.replace(/^refs\/heads\//g, '');
|
|
||||||
}
|
|
||||||
// FIXME: keep this for backward compatibility even if doesn't always seem
|
|
||||||
// to return the expected branch. See the comment below.
|
|
||||||
if (/^refs\/pull\//.test(context.ref) && context.payload?.pull_request?.base?.ref != undefined) {
|
|
||||||
return context.payload.pull_request.base.ref;
|
|
||||||
}
|
|
||||||
return '';
|
|
||||||
},
|
|
||||||
commit_date: function (format, options) {
|
|
||||||
const m = moment(commitDate);
|
|
||||||
let tz = 'UTC';
|
|
||||||
Object.keys(options.hash).forEach(key => {
|
|
||||||
switch (key) {
|
|
||||||
case 'tz':
|
|
||||||
tz = options.hash[key];
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
throw new Error(`Unknown ${key} attribute`);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return m.tz(tz).format(format);
|
|
||||||
},
|
|
||||||
is_default_branch: function () {
|
|
||||||
const branch = context.ref.replace(/^refs\/heads\//g, '');
|
|
||||||
// TODO: "base_ref" is available in the push payload but doesn't always seem to
|
|
||||||
// return the expected branch when the push tag event occurs. It's also not
|
|
||||||
// documented in GitHub docs: https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#push
|
|
||||||
// more context: https://github.com/docker/metadata-action/pull/192#discussion_r854673012
|
|
||||||
// if (/^refs\/tags\//.test(context.ref) && context.payload?.base_ref != undefined) {
|
|
||||||
// branch = context.payload.base_ref.replace(/^refs\/heads\//g, '');
|
|
||||||
// }
|
|
||||||
if (branch == undefined || branch.length == 0) {
|
|
||||||
return 'false';
|
|
||||||
}
|
|
||||||
if (context.payload?.repository?.default_branch == branch) {
|
|
||||||
return 'true';
|
|
||||||
}
|
|
||||||
// following events always trigger for last commit on default branch
|
|
||||||
// https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows
|
|
||||||
if (/create/.test(context.eventName) || /discussion/.test(context.eventName) || /issues/.test(context.eventName) || /schedule/.test(context.eventName)) {
|
|
||||||
return 'true';
|
|
||||||
}
|
|
||||||
return 'false';
|
|
||||||
},
|
|
||||||
date: function (format, options) {
|
|
||||||
const m = moment(currentDate);
|
|
||||||
let tz = 'UTC';
|
|
||||||
Object.keys(options.hash).forEach(key => {
|
|
||||||
switch (key) {
|
|
||||||
case 'tz':
|
|
||||||
tz = options.hash[key];
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
throw new Error(`Unknown ${key} attribute`);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return m.tz(tz).format(format);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private getImageNames(): Array<string> {
|
|
||||||
const images: Array<string> = [];
|
|
||||||
for (const image of this.images) {
|
|
||||||
if (!image.enable) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
images.push(Meta.sanitizeImageName(image.name));
|
|
||||||
}
|
|
||||||
return images;
|
|
||||||
}
|
|
||||||
|
|
||||||
public getTags(): Array<string> {
|
|
||||||
if (!this.version.main) {
|
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
const generateTags = (imageName: string, version: string): Array<string> => {
|
let tags: Array<string> = [];
|
||||||
const tags: Array<string> = [];
|
for (const image of this.inputs.images) {
|
||||||
const prefix = imageName !== '' ? `${imageName}:` : '';
|
tags.push(`${image}:${version.version}`);
|
||||||
tags.push(`${prefix}${version}`);
|
if (version.latest) {
|
||||||
for (const partial of this.version.partial) {
|
tags.push(`${image}:latest`);
|
||||||
tags.push(`${prefix}${partial}`);
|
|
||||||
}
|
}
|
||||||
if (this.version.latest) {
|
if (this.context.sha && this.inputs.tagSha) {
|
||||||
const latestTag = `${this.flavor.prefixLatest ? this.flavor.prefix : ''}latest${this.flavor.suffixLatest ? this.flavor.suffix : ''}`;
|
tags.push(`${image}:sha-${this.context.sha.substr(0, 7)}`);
|
||||||
tags.push(`${prefix}${Meta.sanitizeTag(latestTag)}`);
|
|
||||||
}
|
}
|
||||||
return tags;
|
|
||||||
};
|
|
||||||
|
|
||||||
const tags: Array<string> = [];
|
|
||||||
const images = this.getImageNames();
|
|
||||||
if (images.length > 0) {
|
|
||||||
for (const imageName of images) {
|
|
||||||
tags.push(...generateTags(imageName, this.version.main));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
tags.push(...generateTags('', this.version.main));
|
|
||||||
}
|
}
|
||||||
return tags;
|
return tags;
|
||||||
}
|
}
|
||||||
|
|
||||||
public getLabels(): Array<string> {
|
public labels(): Array<string> {
|
||||||
return this.getOCIAnnotationsWithCustoms(this.inputs.labels);
|
return [
|
||||||
}
|
|
||||||
|
|
||||||
public getAnnotations(): Array<string> {
|
|
||||||
return this.getOCIAnnotationsWithCustoms(this.inputs.annotations);
|
|
||||||
}
|
|
||||||
|
|
||||||
private getOCIAnnotationsWithCustoms(extra: string[]): Array<string> {
|
|
||||||
const res: Array<string> = [
|
|
||||||
`org.opencontainers.image.title=${this.repo.name || ''}`,
|
`org.opencontainers.image.title=${this.repo.name || ''}`,
|
||||||
`org.opencontainers.image.description=${this.repo.description || ''}`,
|
`org.opencontainers.image.description=${this.repo.description || ''}`,
|
||||||
`org.opencontainers.image.url=${this.repo.html_url || ''}`,
|
`org.opencontainers.image.url=${this.repo.html_url || ''}`,
|
||||||
`org.opencontainers.image.source=${this.repo.html_url || ''}`,
|
`org.opencontainers.image.source=${this.repo.clone_url || ''}`,
|
||||||
`org.opencontainers.image.version=${this.version.main || ''}`,
|
`org.opencontainers.image.version=${this.version().version || ''}`,
|
||||||
`org.opencontainers.image.created=${this.date.toISOString()}`,
|
`org.opencontainers.image.created=${this.date.toISOString()}`,
|
||||||
`org.opencontainers.image.revision=${this.context.sha || ''}`,
|
`org.opencontainers.image.revision=${this.context.sha || ''}`,
|
||||||
`org.opencontainers.image.licenses=${this.repo.license?.spdx_id || ''}`
|
`org.opencontainers.image.licenses=${this.repo.license?.spdx_id || ''}`
|
||||||
];
|
];
|
||||||
extra.forEach(label => {
|
|
||||||
res.push(this.setGlobalExp(label));
|
|
||||||
});
|
|
||||||
|
|
||||||
return Array.from(
|
|
||||||
new Map<string, string>(
|
|
||||||
res
|
|
||||||
.map(label => label.split('='))
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
||||||
.filter(([_key, ...values]) => values.length > 0)
|
|
||||||
.map(([key, ...values]) => [key, values.join('=')] as [string, string])
|
|
||||||
)
|
|
||||||
)
|
|
||||||
.sort((a, b) => a[0].localeCompare(b[0]))
|
|
||||||
.map(([key, value]) => `${key}=${value}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
public getJSON(alevels: string[]): unknown {
|
|
||||||
const annotations: Array<string> = [];
|
|
||||||
for (const level of alevels) {
|
|
||||||
annotations.push(...this.getAnnotations().map(label => `${level}:${label}`));
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
tags: this.getTags(),
|
|
||||||
labels: this.getLabels().reduce((res, label) => {
|
|
||||||
const matches = label.match(/([^=]*)=(.*)/);
|
|
||||||
if (!matches) {
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
res[matches[1]] = matches[2];
|
|
||||||
return res;
|
|
||||||
}, {}),
|
|
||||||
annotations: annotations
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
public getBakeFile(kind: string): string {
|
|
||||||
if (kind == 'tags') {
|
|
||||||
return this.generateBakeFile(
|
|
||||||
{
|
|
||||||
tags: this.getTags(),
|
|
||||||
args: {
|
|
||||||
DOCKER_META_IMAGES: this.getImageNames().join(','),
|
|
||||||
DOCKER_META_VERSION: this.version.main
|
|
||||||
}
|
|
||||||
},
|
|
||||||
kind
|
|
||||||
);
|
|
||||||
} else if (kind == 'labels') {
|
|
||||||
return this.generateBakeFile(
|
|
||||||
{
|
|
||||||
labels: this.getLabels().reduce((res, label) => {
|
|
||||||
const matches = label.match(/([^=]*)=(.*)/);
|
|
||||||
if (!matches) {
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
res[matches[1]] = matches[2];
|
|
||||||
return res;
|
|
||||||
}, {})
|
|
||||||
},
|
|
||||||
kind
|
|
||||||
);
|
|
||||||
} else if (kind.startsWith('annotations:')) {
|
|
||||||
const name = kind.split(':')[0];
|
|
||||||
const annotations: Array<string> = [];
|
|
||||||
for (const level of kind.split(':')[1].split(',')) {
|
|
||||||
annotations.push(...this.getAnnotations().map(label => `${level}:${label}`));
|
|
||||||
}
|
|
||||||
return this.generateBakeFile(
|
|
||||||
{
|
|
||||||
annotations: annotations
|
|
||||||
},
|
|
||||||
name
|
|
||||||
);
|
|
||||||
}
|
|
||||||
throw new Error(`Unknown bake file type: ${kind}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
public getBakeFileTagsLabels(): string {
|
|
||||||
return this.generateBakeFile({
|
|
||||||
tags: this.getTags(),
|
|
||||||
labels: this.getLabels().reduce((res, label) => {
|
|
||||||
const matches = label.match(/([^=]*)=(.*)/);
|
|
||||||
if (!matches) {
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
res[matches[1]] = matches[2];
|
|
||||||
return res;
|
|
||||||
}, {}),
|
|
||||||
args: {
|
|
||||||
DOCKER_META_IMAGES: this.getImageNames().join(','),
|
|
||||||
DOCKER_META_VERSION: this.version.main
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private generateBakeFile(dt, suffix?: string): string {
|
|
||||||
const bakeFile = path.join(ToolkitContext.tmpDir(), `docker-metadata-action-bake${suffix ? `-${suffix}` : ''}.json`);
|
|
||||||
fs.writeFileSync(bakeFile, JSON.stringify({target: {[this.inputs.bakeTarget]: dt}}, null, 2));
|
|
||||||
return bakeFile;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static sanitizeImageName(name: string): string {
|
|
||||||
return name.toLowerCase();
|
|
||||||
}
|
|
||||||
|
|
||||||
private static sanitizeTag(tag: string): string {
|
|
||||||
return tag.replace(/[^a-zA-Z0-9._-]+/g, '-');
|
|
||||||
}
|
|
||||||
|
|
||||||
private static shortSha(sha: string): string {
|
|
||||||
let shortShaLength = defaultShortShaLength;
|
|
||||||
if (process.env.DOCKER_METADATA_SHORT_SHA_LENGTH) {
|
|
||||||
if (isNaN(Number(process.env.DOCKER_METADATA_SHORT_SHA_LENGTH))) {
|
|
||||||
throw new Error(`DOCKER_METADATA_SHORT_SHA_LENGTH is not a valid number: ${process.env.DOCKER_METADATA_SHORT_SHA_LENGTH}`);
|
|
||||||
}
|
|
||||||
shortShaLength = Number(process.env.DOCKER_METADATA_SHORT_SHA_LENGTH);
|
|
||||||
}
|
|
||||||
if (shortShaLength >= sha.length) {
|
|
||||||
return sha;
|
|
||||||
}
|
|
||||||
return sha.substring(0, shortShaLength);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user