Merge branch 'dev'

This commit is contained in:
Shakar Bakr 2023-11-01 16:45:28 +03:00
commit 5675521411
No known key found for this signature in database
GPG Key ID: DA55A26823AE3C28
12 changed files with 221 additions and 696 deletions

View File

@ -1,37 +0,0 @@
name: Test Action
on:
# pull_request:
# types: [labeled]
push:
branches:
- dev
jobs:
hello-world-job:
runs-on: ubuntu-latest
name: A job to say hello
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: "20"
- name: Install dependencies
run: npm install
- name: Hello world action step
uses: ./
id: hello
with:
label: minor
githubToken: ${{ secrets.GITHUB_TOKEN }}
# ${{ github.event.label.name }}
- name: Get the output time
run: |
echo The label was label
# ${{ steps.hello.outputs.label }}

View File

@ -0,0 +1,32 @@
name: Release
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: version
id: version
run: |
tag=${GITHUB_REF/refs\/tags\//}
version=${tag#v}
major=${version%%.*}
echo "tag=${tag}" >> $GITHUB_OUTPUT
echo "version=${version}" >> $GITHUB_OUTPUT
echo "major=${major}" >> $GITHUB_OUTPUT
- name: force update major tag
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git tag v${{ steps.version.outputs.major }} ${{ steps.version.outputs.tag }} -f
git push origin refs/tags/v${{ steps.version.outputs.major }} -f

1
.gitignore vendored
View File

@ -1 +0,0 @@
/node_modules

View File

@ -1,5 +0,0 @@
FROM alpine:3.10
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT [ "./entrypoint.sh" ]

View File

@ -1,22 +1,80 @@
**# Hello world docker action
Certainly! Here's the README file for your **Project Version Check** GitHub Action:
This action prints "Hello World" or "Hello" + the name of a person to greet to the log.
---
# Project Version Check GitHub Action
The **Project Version Check** GitHub Action is a custom action designed to help you manage and maintain your project's version when following semantic versioning for releases. Whether your project is based on Node.js or .NET, this action automates the process of checking the project version against a Git tag and updating it when necessary.
## Why Use Project Version Check?
- **Semantic Versioning**: If you're using semantic versioning (e.g., `v1.0.0`) for your project releases, this action ensures that your project's version property is always in sync with the Git tag.
- **Automated Version Updates**: No need to manually update version numbers in your `package.json` (Node.js) or `csproj` files (.NET). The action does it for you.
- **Seamless Workflow**: Integrates seamlessly into your GitHub Actions workflow, making it easy to keep your project version up to date.
## Inputs
## `who-to-greet`
### `branch` (optional)
**Required** The name of the person to greet. Default `"World"`.
- **Description**: The name of the branch you want to target for version checks.
- **Required**: No
- **Default**: `main`
## Outputs
## Example Usage
## `time`
```yaml
name: "Project Version Check"
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+' # Match tags with the pattern vX.X.X
The time we greeted you.
jobs:
project_version_check:
name: Check and Update Project Version
runs-on: ubuntu-latest
## Example usage
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/hello-world-docker-action@v1.1
with:
who-to-greet: 'Mona the Octocat'
**
- name: Project Version Check
uses: ditkrg/project-version-check@v1
with:
branch: main # Optional, specify the target branch for creating releases
- name: Example Workflow Step
run: |
# Your workflow steps here
```
The action is integrated into a workflow that triggers only when tags are pushed with the pattern `vX.X.X`. You can customize the branch name by specifying the `branch` input.
If you're not creating releases from the `main` branch and want to specify a different branch for creating releases, you can set the `branch` input to that specific branch.
## How it Works
If you're using semantic versioning for your releases, the **Project Version Check** GitHub Action will help you keep your `package.json` (for Node.js projects) or `csproj` version property (for .NET projects) up to date with your releases. Here's how it works:
1. **Determine Project Type**: The action first determines the type of your project (Node.js or .NET) by inspecting the project files.
2. **Fetch Git Tag**: It fetches the Git tag associated with the release.
3. **Get Branch Name**: The action allows you to specify the target branch for version checks. By default, it uses the `main` branch.
4. **Get App Version**: Depending on your project type, it retrieves the project's version from `package.json` (Node.js) or the `csproj` files (.NET).
5. **Compare Versions**: The action compares the project version with the Git tag. If they don't match, it proceeds to update the project version.
6. **Update Version**: It updates the version in either `package.json` or the `csproj` files, depending on the project type.
7. **Commit Changes**: The action commits the updated version to the repository and records the commit SHA.
8. **Update Tag**: Finally, it updates the Git tag with the latest version and pushes it to the repository.
By following this workflow, your project's version property will always match your Git tag, ensuring that your releases are accurately reflected in your project files.
**Important**: Ensure that your GitHub repository has the necessary permissions and secrets (e.g., `GITHUB_TOKEN`) to perform Git operations and update the repository.

View File

@ -1,20 +1,123 @@
name: "Hello World"
description: "Greet someone and record the time"
name: "Project Version Check"
description: "Checks if the project version matches the Git tag"
inputs:
label:
description: "Optional label"
branch:
description: "Branch name"
required: false
filePath:
description: "File path of the project info (e.g: package.json) relative to the root directory of the repository."
required: false
githubToken:
description: GitHub repository token
required: true
outputs:
time: # id of output
description: "The time we greeted you"
default: main
runs:
using: "node20"
main: "dist/index.js"
using: "composite"
steps:
- name: Determine project type
shell: bash
id: detect_project
run: |
if $(find * -name 'package.json' | grep -q '.'); then
echo "nodejs"
echo "PROJECT_TYPE=nodejs" >> $GITHUB_OUTPUT
elif find * -name '*.csproj' | grep -q '.'; then
echo "dotnet"
echo "PROJECT_TYPE=dotnet" >> $GITHUB_OUTPUT
fi
- name: Get Tag
shell: bash
id: get-tag
run: |
RELEASE_VERSION=${GITHUB_REF#refs/*/}
echo "RELEASE_VERSION=${RELEASE_VERSION#v}" >> $GITHUB_OUTPUT
- name: Get Branch Name
shell: bash
id: get-branch
run: |
BRANCH_NAME=${{ inputs.branch }}
git fetch
git checkout $BRANCH_NAME
git pull
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_OUTPUT
- if: ${{ steps.detect_project.outputs.PROJECT_TYPE == 'nodejs' }}
shell: bash
name: Get App version (nodejs)
id: get_nodejs_version
run: |
echo "PROJECT_VERSION=$(jq -r .version package.json)" >> $GITHUB_ENV
- if: ${{ steps.detect_project.outputs.PROJECT_TYPE == 'dotnet' }}
shell: bash
name: Get App version (dotnet)
id: get_dotnet_version
run: |
echo "PROJECT_VERSION=$(find . -name '*.csproj' ! -path "*tests*" -exec grep -oP '<Version>\K[^<]+' {} \; -quit)" >> $GITHUB_ENV
- name: Compare App version
shell: bash
run: |
if [ "$PROJECT_VERSION" == "$RELEASE_VERSION" ]; then
echo "App version matches Git tag: $PROJECT_VERSION"
else
echo "App version ($PROJECT_VERSION) does not match Git tag ($RELEASE_VERSION)"
fi
- name: Update version
shell: bash
run: |
if [ "$PROJECT_TYPE" == "nodejs" ]; then
echo "Updating version in package.json"
jq --arg version "$RELEASE_VERSION" '.version = $version' package.json > package.json.tmp
mv package.json.tmp package.json
echo "FILE_TO_COMMIT=$(find * -name 'package.json')" >> $GITHUB_ENV
elif [ "$PROJECT_TYPE" == "dotnet" ]; then
echo "Updating version in *.csproj"
find . -name '*.csproj' ! -path "*tests*" -exec sed -i "s/<Version>[^<]*<\/Version>/<Version>$RELEASE_VERSION<\/Version>/g" {} \;
echo "FILE_TO_COMMIT=$(find . -name '*.csproj' ! -path "*tests*")" >> $GITHUB_ENV
fi
env:
PROJECT_TYPE: ${{ steps.detect_project.outputs.PROJECT_TYPE }}
RELEASE_VERSION: ${{ steps.get-tag.outputs.RELEASE_VERSION }}
- name: Commit changes
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FILE_TO_COMMIT: ${{ env.FILE_TO_COMMIT }}
DESTINATION_BRANCH: ${{ steps.get-branch.outputs.BRANCH_NAME }}
run: |
REPO_PATH=${{ github.repository }}
REPO_NAME=${REPO_PATH#*/}
FILE_TO_COMMIT="${FILE_TO_COMMIT#./}"
echo "File path: $FILE_TO_COMMIT"
git fetch
git pull
export MESSAGE="chore: update version to $RELEASE_VERSION"
export SHA=$( git rev-parse $DESTINATION_BRANCH:$FILE_TO_COMMIT )
export CONTENT=$( base64 -i $FILE_TO_COMMIT )
gh api --method PUT /repos/$REPO_PATH/contents/$FILE_TO_COMMIT \
--field message="$MESSAGE" \
--field content="$CONTENT" \
--field encoding="base64" \
--field branch="$DESTINATION_BRANCH" \
--field sha="$SHA"
echo "COMMIT_SHA=$SHA" >> $GITHUB_ENV
- name: Update tag
shell: bash
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git reset --hard
git fetch
git pull
git tag -f v$RELEASE_VERSION $(git rev-parse main)
git push --force origin ${{ inputs.branch }} --tags
env:
RELEASE_VERSION: ${{ steps.get-tag.outputs.RELEASE_VERSION }}
COMMIT_SHA: ${{ env.COMMIT_SHA }}

20
dist/index.js vendored

File diff suppressed because one or more lines are too long

9
dist/licenses.txt vendored
View File

@ -1,9 +0,0 @@
@vercel/ncc
MIT
Copyright 2018 ZEIT, Inc.
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:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 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 SOFTWARE.

View File

@ -1,5 +0,0 @@
#!/bin/sh -l
echo "Hello $1"
time=$(date)
echo "time=$time" >> $GITHUB_OUTPUT

200
index.js
View File

@ -1,200 +0,0 @@
const core = require('@actions/core')
const github = require('@actions/github')
const fs = require('fs')
const axios = require('axios');
run();
async function run() {
try {
console.log(`CWD: ${process.cwd()}`)
const filePathInput = core.getInput('filePath');
const labelInput = core.getInput('label');
const filePath = getProjectInfoFilePath(filePathInput);
const file = require(filePath);
console.log(`Label: ${labelInput}`)
console.log(`File path: ${file}`)
core.setOutput("label", labelInput);
const version = getProjectVersion(filePath);
// the version is in semantic format, so we can split it by dot
const versionParts = version.split('.');
// 1.2.3 => [1, 2, 3]
if (labelInput === 'major') {
versionParts[0] = parseInt(versionParts[0]) + 1;
versionParts[1] = 0;
versionParts[2] = 0;
} else if (labelInput == 'minor') {
versionParts[1] = parseInt(versionParts[1]) + 1;
versionParts[2] = 0;
}
else if (labelInput == 'patch')
versionParts[2] = parseInt(versionParts[2]) + 1;
// join the parts back together
const newVersion = versionParts.join('.');
updateProjectVersion(filePath, newVersion);
console.log(`Old version: ${version}. New version: ${newVersion}`)
console.log(`Old version: ${version}. New version: ${newVersion}`)
const filePathRelatedToRoot = getProjectInfoFilePath(filePathInput, true);
await commitChanges(file, filePathRelatedToRoot);
// console.log(`The event payload: ${payload}`);
} catch (error) {
core.setFailed(error.message);
}
}
// Region functions
async function commitChanges(file, filePath) {
const commitMessage = 'Commit message here';
let newContent = JSON.stringify(file, null, 2);
// Append a newline character to the end of the new content
newContent += '\n';
const githubToken = core.getInput('githubToken');
// Get the repository owner and name
const repoFullName = process.env.GITHUB_REPOSITORY;
const [owner, repo] = repoFullName.split('/');
// Get the current branch
const branch = process.env.GITHUB_REF.replace('refs/heads/', '');
try {
// Get the current commit SHA for the branch
const branchResponse = await axios.get(
`https://api.github.com/repos/${owner}/${repo}/branches/${branch}`
);
const baseTreeSha = branchResponse.data.commit.sha;
// Create a new blob with the updated content
console.log('Branch')
const blobResponse = await axios.post(
`https://api.github.com/repos/${owner}/${repo}/git/blobs`,
{
content: newContent,
encoding: 'utf-8',
},
{
headers: {
'Accept': 'application/vnd.github.v3+json',
'Authorization': `Bearer ${githubToken}`,
},
}
);
console.log('Blob Created')
console.log('File path: ', filePath)
const newBlobSha = blobResponse.data.sha;
// Create a new tree with the updated blob
const treeResponse = await axios.post(
`https://api.github.com/repos/${owner}/${repo}/git/trees`,
{
base_tree: baseTreeSha,
tree: [
{
path: filePath,
mode: '100644',
type: 'blob',
sha: newBlobSha,
},
],
},
{
headers: {
'Accept': 'application/vnd.github+json',
'Authorization': `Bearer ${githubToken}`
},
}
);
console.log('Tree Created')
const newTreeSha = treeResponse.data.sha;
// Create a new commit
const commitResponse = await axios.post(
`https://api.github.com/repos/${owner}/${repo}/git/commits`,
{
message: commitMessage,
tree: newTreeSha,
parents: [baseTreeSha],
},
{
headers: {
'Accept': 'application/vnd.github+json',
'Authorization': `Bearer ${githubToken}`,
},
}
);
console.log('Commit Created')
const newCommitSha = commitResponse.data.sha;
// Update the branch reference
await axios.patch(
`https://api.github.com/repos/${owner}/${repo}/git/refs/heads/${branch}`,
{
sha: newCommitSha,
},
{
headers: {
'Accept': 'application/vnd.github+json',
'Authorization': `Bearer ${githubToken}`,
},
}
);
console.log('Branch Updated')
} catch (error) {
console.log(error)
core.setFailed(error);
}
}
function getProjectInfoFilePath(filePath, relativeToRoot = false) {
if (filePath == null || filePath == undefined || filePath == '') {
// List files inside the root directory of the repository
const files = fs.readdirSync(process.cwd());
// Return the first file that matches .csproj or package.json
const projectInfoFile = files.find(file => file.match(/\.csproj|package\.json/));
return relativeToRoot ? projectInfoFile : `${process.cwd()}/${projectInfoFile}`;
}
else
return relativeToRoot ? filePath : `${process.cwd()}/${filePath}`;
}
function getProjectVersion(filePath) {
const projectInfoFile = require(filePath);
// Update the version if the file is .csproj
if (filePath.match(/\.csproj/))
return projectInfoFile.Project.PropertyGroup[0].Version;
else if (filePath.match(/package\.json/))
return projectInfoFile.version;
}
function updateProjectVersion(filePath, newVersion) {
const projectInfoFile = require(filePath);
// Update the version if the file is .csproj
if (filePath.match(/\.csproj/))
projectInfoFile.Project.PropertyGroup[0].Version = newVersion;
else if (filePath.match(/package\.json/))
projectInfoFile.version = newVersion;
}

368
package-lock.json generated
View File

@ -1,368 +0,0 @@
{
"name": "docker-container-action",
"version": "1.8.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "docker-container-action",
"version": "1.8.0",
"license": "ISC",
"dependencies": {
"@actions/core": "^1.10.0",
"@actions/github": "^5.1.1",
"@actions/io": "^1.1.3",
"axios": "^1.5.0",
"xml2js": "^0.6.2"
},
"devDependencies": {
"@types/node": "^20.6.2"
}
},
"node_modules/@actions/core": {
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.0.tgz",
"integrity": "sha512-2aZDDa3zrrZbP5ZYg159sNoLRb61nQ7awl5pSvIq5Qpj81vwDzdMRKzkWJGJuwVvWpvZKx7vspJALyvaaIQyug==",
"dependencies": {
"@actions/http-client": "^2.0.1",
"uuid": "^8.3.2"
}
},
"node_modules/@actions/github": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/@actions/github/-/github-5.1.1.tgz",
"integrity": "sha512-Nk59rMDoJaV+mHCOJPXuvB1zIbomlKS0dmSIqPGxd0enAXBnOfn4VWF+CGtRCwXZG9Epa54tZA7VIRlJDS8A6g==",
"dependencies": {
"@actions/http-client": "^2.0.1",
"@octokit/core": "^3.6.0",
"@octokit/plugin-paginate-rest": "^2.17.0",
"@octokit/plugin-rest-endpoint-methods": "^5.13.0"
}
},
"node_modules/@actions/http-client": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.1.1.tgz",
"integrity": "sha512-qhrkRMB40bbbLo7gF+0vu+X+UawOvQQqNAA/5Unx774RS8poaOhThDOG6BGmxvAnxhQnDp2BG/ZUm65xZILTpw==",
"dependencies": {
"tunnel": "^0.0.6"
}
},
"node_modules/@actions/io": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/@actions/io/-/io-1.1.3.tgz",
"integrity": "sha512-wi9JjgKLYS7U/z8PPbco+PvTb/nRWjeoFlJ1Qer83k/3C5PHQi28hiVdeE2kHXmIL99mQFawx8qt/JPjZilJ8Q=="
},
"node_modules/@octokit/auth-token": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.5.0.tgz",
"integrity": "sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g==",
"dependencies": {
"@octokit/types": "^6.0.3"
}
},
"node_modules/@octokit/core": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.6.0.tgz",
"integrity": "sha512-7RKRKuA4xTjMhY+eG3jthb3hlZCsOwg3rztWh75Xc+ShDWOfDDATWbeZpAHBNRpm4Tv9WgBMOy1zEJYXG6NJ7Q==",
"dependencies": {
"@octokit/auth-token": "^2.4.4",
"@octokit/graphql": "^4.5.8",
"@octokit/request": "^5.6.3",
"@octokit/request-error": "^2.0.5",
"@octokit/types": "^6.0.3",
"before-after-hook": "^2.2.0",
"universal-user-agent": "^6.0.0"
}
},
"node_modules/@octokit/endpoint": {
"version": "6.0.12",
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.12.tgz",
"integrity": "sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA==",
"dependencies": {
"@octokit/types": "^6.0.3",
"is-plain-object": "^5.0.0",
"universal-user-agent": "^6.0.0"
}
},
"node_modules/@octokit/graphql": {
"version": "4.8.0",
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.8.0.tgz",
"integrity": "sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg==",
"dependencies": {
"@octokit/request": "^5.6.0",
"@octokit/types": "^6.0.3",
"universal-user-agent": "^6.0.0"
}
},
"node_modules/@octokit/openapi-types": {
"version": "12.11.0",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz",
"integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ=="
},
"node_modules/@octokit/plugin-paginate-rest": {
"version": "2.21.3",
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.21.3.tgz",
"integrity": "sha512-aCZTEf0y2h3OLbrgKkrfFdjRL6eSOo8komneVQJnYecAxIej7Bafor2xhuDJOIFau4pk0i/P28/XgtbyPF0ZHw==",
"dependencies": {
"@octokit/types": "^6.40.0"
},
"peerDependencies": {
"@octokit/core": ">=2"
}
},
"node_modules/@octokit/plugin-rest-endpoint-methods": {
"version": "5.16.2",
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.16.2.tgz",
"integrity": "sha512-8QFz29Fg5jDuTPXVtey05BLm7OB+M8fnvE64RNegzX7U+5NUXcOcnpTIK0YfSHBg8gYd0oxIq3IZTe9SfPZiRw==",
"dependencies": {
"@octokit/types": "^6.39.0",
"deprecation": "^2.3.1"
},
"peerDependencies": {
"@octokit/core": ">=3"
}
},
"node_modules/@octokit/request": {
"version": "5.6.3",
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.3.tgz",
"integrity": "sha512-bFJl0I1KVc9jYTe9tdGGpAMPy32dLBXXo1dS/YwSCTL/2nd9XeHsY616RE3HPXDVk+a+dBuzyz5YdlXwcDTr2A==",
"dependencies": {
"@octokit/endpoint": "^6.0.1",
"@octokit/request-error": "^2.1.0",
"@octokit/types": "^6.16.1",
"is-plain-object": "^5.0.0",
"node-fetch": "^2.6.7",
"universal-user-agent": "^6.0.0"
}
},
"node_modules/@octokit/request-error": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz",
"integrity": "sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==",
"dependencies": {
"@octokit/types": "^6.0.3",
"deprecation": "^2.0.0",
"once": "^1.4.0"
}
},
"node_modules/@octokit/types": {
"version": "6.41.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz",
"integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==",
"dependencies": {
"@octokit/openapi-types": "^12.11.0"
}
},
"node_modules/@types/node": {
"version": "20.6.2",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.6.2.tgz",
"integrity": "sha512-Y+/1vGBHV/cYk6OI1Na/LHzwnlNCAfU3ZNGrc1LdRe/LAIbdDPTTv/HU3M7yXN448aTVDq3eKRm2cg7iKLb8gw==",
"dev": true
},
"node_modules/asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
},
"node_modules/axios": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.5.0.tgz",
"integrity": "sha512-D4DdjDo5CY50Qms0qGQTTw6Q44jl7zRwY7bthds06pUGfChBCTcQs+N743eFWGEd6pRTMd6A+I87aWyFV5wiZQ==",
"dependencies": {
"follow-redirects": "^1.15.0",
"form-data": "^4.0.0",
"proxy-from-env": "^1.1.0"
}
},
"node_modules/before-after-hook": {
"version": "2.2.3",
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz",
"integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ=="
},
"node_modules/combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
"dependencies": {
"delayed-stream": "~1.0.0"
},
"engines": {
"node": ">= 0.8"
}
},
"node_modules/delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
"engines": {
"node": ">=0.4.0"
}
},
"node_modules/deprecation": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz",
"integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ=="
},
"node_modules/follow-redirects": {
"version": "1.15.2",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz",
"integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==",
"funding": [
{
"type": "individual",
"url": "https://github.com/sponsors/RubenVerborgh"
}
],
"engines": {
"node": ">=4.0"
},
"peerDependenciesMeta": {
"debug": {
"optional": true
}
}
},
"node_modules/form-data": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
"integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
"dependencies": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"mime-types": "^2.1.12"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/is-plain-object": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz",
"integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/mime-db": {
"version": "1.52.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/mime-types": {
"version": "2.1.35",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
"dependencies": {
"mime-db": "1.52.0"
},
"engines": {
"node": ">= 0.6"
}
},
"node_modules/node-fetch": {
"version": "2.7.0",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz",
"integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==",
"dependencies": {
"whatwg-url": "^5.0.0"
},
"engines": {
"node": "4.x || >=6.0.0"
},
"peerDependencies": {
"encoding": "^0.1.0"
},
"peerDependenciesMeta": {
"encoding": {
"optional": true
}
}
},
"node_modules/once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
"dependencies": {
"wrappy": "1"
}
},
"node_modules/proxy-from-env": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="
},
"node_modules/sax": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw=="
},
"node_modules/tr46": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
},
"node_modules/tunnel": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
"integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==",
"engines": {
"node": ">=0.6.11 <=0.7.0 || >=0.7.3"
}
},
"node_modules/universal-user-agent": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz",
"integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w=="
},
"node_modules/uuid": {
"version": "8.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
"integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
"bin": {
"uuid": "dist/bin/uuid"
}
},
"node_modules/webidl-conversions": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="
},
"node_modules/whatwg-url": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
"dependencies": {
"tr46": "~0.0.3",
"webidl-conversions": "^3.0.0"
}
},
"node_modules/wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
},
"node_modules/xml2js": {
"version": "0.6.2",
"resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.6.2.tgz",
"integrity": "sha512-T4rieHaC1EXcES0Kxxj4JWgaUQHDk+qwHcYOCFHfiwKz7tOVPLq7Hjq9dM1WCMhylqMEfP7hMcOIChvotiZegA==",
"dependencies": {
"sax": ">=0.6.0",
"xmlbuilder": "~11.0.0"
},
"engines": {
"node": ">=4.0.0"
}
},
"node_modules/xmlbuilder": {
"version": "11.0.1",
"resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz",
"integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==",
"engines": {
"node": ">=4.0"
}
}
}
}

View File

@ -1,23 +0,0 @@
{
"name": "docker-container-action",
"version": "1.13.0",
"description": "This action prints \"Hello World\" or \"Hello\" + the name of a person to greet to the log.",
"main": "dist/index.js",
"scripts": {
"build": "ncc -m -o dist build index.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@actions/core": "^1.10.0",
"@actions/github": "^5.1.1",
"@actions/io": "^1.1.3",
"axios": "^1.5.0",
"xml2js": "^0.6.2"
},
"devDependencies": {
"@types/node": "^20.6.2"
}
}