mirror of
https://github.com/redhat-actions/podman-login.git
synced 2025-02-22 18:11:21 +01:00
Update to node20 and dependencies bump
Signed-off-by: divyansh42 <diagrawa@redhat.com>
This commit is contained in:
parent
bcf6f9c330
commit
1cfc5d852e
11 changed files with 1391 additions and 1310 deletions
12
.github/workflows/ci.yml
vendored
12
.github/workflows/ci.yml
vendored
|
@ -8,21 +8,21 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
name: Run ESLint
|
name: Run ESLint
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- run: npm run lint
|
- run: npm run lint
|
||||||
|
|
||||||
check-dist:
|
check-dist:
|
||||||
name: Check Distribution
|
name: Check Distribution
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
env:
|
env:
|
||||||
BUNDLE_FILE: "dist/index.js"
|
BUNDLE_FILE: "dist/index.js"
|
||||||
BUNDLE_COMMAND: "npm run bundle"
|
BUNDLE_COMMAND: "npm run bundle"
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install
|
- name: Install
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
@ -35,11 +35,11 @@ jobs:
|
||||||
|
|
||||||
check-inputs-outputs:
|
check-inputs-outputs:
|
||||||
name: Check Input and Output enums
|
name: Check Input and Output enums
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
env:
|
env:
|
||||||
IO_FILE: ./src/generated/inputs-outputs.ts
|
IO_FILE: ./src/generated/inputs-outputs.ts
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
6
.github/workflows/example.yml
vendored
6
.github/workflows/example.yml
vendored
|
@ -15,7 +15,7 @@ env:
|
||||||
jobs:
|
jobs:
|
||||||
podman-pull:
|
podman-pull:
|
||||||
name: Log in and pull image with Podman
|
name: Log in and pull image with Podman
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -43,7 +43,7 @@ jobs:
|
||||||
|
|
||||||
buildah-pull:
|
buildah-pull:
|
||||||
name: Log in and pull image with Buildah
|
name: Log in and pull image with Buildah
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -69,7 +69,7 @@ jobs:
|
||||||
|
|
||||||
docker-pull:
|
docker-pull:
|
||||||
name: Log in and pull image with Docker
|
name: Log in and pull image with Docker
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
|
4
.github/workflows/link_check.yml
vendored
4
.github/workflows/link_check.yml
vendored
|
@ -12,9 +12,9 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
markdown-link-check:
|
markdown-link-check:
|
||||||
name: Check links in markdown
|
name: Check links in markdown
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
- uses: gaurav-nelson/github-action-markdown-link-check@v1
|
- uses: gaurav-nelson/github-action-markdown-link-check@v1
|
||||||
with:
|
with:
|
||||||
use-verbose-mode: true
|
use-verbose-mode: true
|
||||||
|
|
16
.github/workflows/security_scan.yml
vendored
16
.github/workflows/security_scan.yml
vendored
|
@ -1,24 +1,24 @@
|
||||||
name: Vulnerability Scan with CRDA
|
name: Vulnerability Scan with CRDA
|
||||||
on:
|
on:
|
||||||
push:
|
# push:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
pull_request_target:
|
# pull_request_target:
|
||||||
types: [ assigned, opened, synchronize, reopened, labeled, edited ]
|
# types: [ assigned, opened, synchronize, reopened, labeled, edited ]
|
||||||
schedule:
|
# schedule:
|
||||||
- cron: '0 0 * * *' # every day at midnight
|
# - cron: '0 0 * * *' # every day at midnight
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
crda-scan:
|
crda-scan:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
name: Scan project vulnerability with CRDA
|
name: Scan project vulnerability with CRDA
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: '16'
|
node-version: '20'
|
||||||
|
|
||||||
- name: Install CRDA
|
- name: Install CRDA
|
||||||
uses: redhat-actions/openshift-tools-installer@v1
|
uses: redhat-actions/openshift-tools-installer@v1
|
||||||
|
|
|
@ -25,6 +25,6 @@ inputs:
|
||||||
default: 'true'
|
default: 'true'
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: 'node16'
|
using: 'node20'
|
||||||
main: 'dist/index.js'
|
main: 'dist/index.js'
|
||||||
post: 'dist/index.js'
|
post: 'dist/index.js'
|
||||||
|
|
17
dist/index.js
vendored
17
dist/index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
2613
package-lock.json
generated
2613
package-lock.json
generated
File diff suppressed because it is too large
Load diff
24
package.json
24
package.json
|
@ -2,7 +2,7 @@
|
||||||
"name": "podman-login",
|
"name": "podman-login",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "16"
|
"node": "20"
|
||||||
},
|
},
|
||||||
"description": "GitHub Action to log in against a container image registry",
|
"description": "GitHub Action to log in against a container image registry",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
@ -21,21 +21,21 @@
|
||||||
"author": "Red Hat",
|
"author": "Red Hat",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.10.0",
|
"@actions/core": "^1.10.1",
|
||||||
"@actions/exec": "^1.0.4",
|
"@actions/exec": "^1.1.1",
|
||||||
"@actions/io": "^1.0.2",
|
"@actions/io": "^1.1.3",
|
||||||
"@aws-sdk/client-ecr": "^3.350.0",
|
"@aws-sdk/client-ecr": "^3.535.0",
|
||||||
"@aws-sdk/util-base64": "^3.208.0"
|
"@aws-sdk/util-base64": "^3.310.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@redhat-actions/action-io-generator": "^1.5.0",
|
"@redhat-actions/action-io-generator": "^1.5.0",
|
||||||
"@redhat-actions/eslint-config": "^1.3.2",
|
"@redhat-actions/eslint-config": "^1.3.2",
|
||||||
"@redhat-actions/tsconfig": "^1.2.0",
|
"@redhat-actions/tsconfig": "^1.2.0",
|
||||||
"@types/node": "^16.18.11",
|
"@types/node": "^20",
|
||||||
"@typescript-eslint/eslint-plugin": "^4.14.1",
|
"@typescript-eslint/eslint-plugin": "^7.2.0",
|
||||||
"@typescript-eslint/parser": "^4.33.0",
|
"@typescript-eslint/parser": "^7.2.0",
|
||||||
"@vercel/ncc": "^0.36.1",
|
"@vercel/ncc": "^0.38.1",
|
||||||
"eslint": "^7.32.0",
|
"eslint": "^8.57.0",
|
||||||
"typescript": "^4.9.5"
|
"typescript": "^5.4.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,7 +71,8 @@ async function run(): Promise<void> {
|
||||||
podmanAuthFilePath = authFilePath;
|
podmanAuthFilePath = authFilePath;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
let authFileDir = path.join("/", "tmp", `podman-run-${process.getuid()}`);
|
// process.getuid might be undefined
|
||||||
|
let authFileDir = path.join("/", "tmp", `podman-run-${process.getuid ? process.getuid() : null}`);
|
||||||
if (process.env.XDG_RUNTIME_DIR) {
|
if (process.env.XDG_RUNTIME_DIR) {
|
||||||
authFileDir = process.env.XDG_RUNTIME_DIR;
|
authFileDir = process.env.XDG_RUNTIME_DIR;
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,5 +70,5 @@ export async function execute(
|
||||||
export async function getDockerConfigJson(): Promise<string> {
|
export async function getDockerConfigJson(): Promise<string> {
|
||||||
const dockerConfigPath = path.join(os.homedir(), ".docker", "config.json");
|
const dockerConfigPath = path.join(os.homedir(), ".docker", "config.json");
|
||||||
return fs.readFile(dockerConfigPath, "utf-8")
|
return fs.readFile(dockerConfigPath, "utf-8")
|
||||||
.catch((err) => { if (err.code === 'ENOENT') { return '{"auths":{}}'; } throw err; });
|
.catch((err) => { if (err.code === "ENOENT") { return `{"auths":{}}`; } throw err; });
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue