Compare commits

...

11 commits
v1.4 ... main

Author SHA1 Message Date
divyansh42
4934294ad0 Update changelog
Signed-off-by: divyansh42 <diagrawa@redhat.com>
2024-03-16 22:43:37 +05:30
divyansh42
1cfc5d852e Update to node20 and dependencies bump
Signed-off-by: divyansh42 <diagrawa@redhat.com>
2024-03-16 22:40:10 +05:30
Daniel Rudolf
bcf6f9c330
getDockerConfigJson(): Return empty auth when ~/.docker/config.json doesn't exist (#39) 2024-03-16 22:05:46 +05:30
dependabot[bot]
a7d8d3e644
Bump fast-xml-parser and @aws-sdk/client-ecr (#35)
Bumps [fast-xml-parser](https://github.com/NaturalIntelligence/fast-xml-parser) to 4.2.4 and updates ancestor dependency [@aws-sdk/client-ecr](https://github.com/aws/aws-sdk-js-v3/tree/HEAD/clients/client-ecr). These dependencies need to be updated together.


Updates `fast-xml-parser` from 4.0.11 to 4.2.4
- [Release notes](https://github.com/NaturalIntelligence/fast-xml-parser/releases)
- [Changelog](https://github.com/NaturalIntelligence/fast-xml-parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/NaturalIntelligence/fast-xml-parser/compare/v4.0.11...v4.2.4)

Updates `@aws-sdk/client-ecr` from 3.261.0 to 3.350.0
- [Release notes](https://github.com/aws/aws-sdk-js-v3/releases)
- [Changelog](https://github.com/aws/aws-sdk-js-v3/blob/main/clients/client-ecr/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-js-v3/commits/v3.350.0/clients/client-ecr)

---
updated-dependencies:
- dependency-name: fast-xml-parser
  dependency-type: indirect
- dependency-name: "@aws-sdk/client-ecr"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-13 20:20:27 +05:30
divyansh42
9184318aae Update changelog for v1.6
Signed-off-by: divyansh42 <diagrawa@redhat.com>
2023-03-11 18:20:56 +05:30
Jens Reimann
8cb6c181aa
chore: update dependencies (#34)
* chore: update dependencies

This updates the @actions/core to 1.10.x, which is required to fix the
deprecated state functionality. See: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

closes #33

* style: fix lint errors
2023-03-11 18:16:14 +05:30
divyansh42
7283c5d4ff Add changelog for v1.5
Signed-off-by: divyansh42 <diagrawa@redhat.com>
2022-12-29 20:03:11 +05:30
divyansh42
f15701c1a2 Update node version in crda workflow
Signed-off-by: divyansh42 <diagrawa@redhat.com>
2022-12-25 21:07:35 +05:30
divyansh42
9fec908dba Update bundles
Signed-off-by: divyansh42 <diagrawa@redhat.com>
2022-12-25 21:04:33 +05:30
dependabot[bot]
f7d3f4f147
Bump @actions/core from 1.2.6 to 1.9.1 (#32)
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.2.6 to 1.9.1.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

---
updated-dependencies:
- dependency-name: "@actions/core"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-24 15:14:53 +05:30
Timothée Ravier
097e0bb4d1 action: Update to Node 16 (#28)
See https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/
2022-12-24 12:08:29 +05:30
14 changed files with 3263 additions and 6279 deletions

View file

@ -8,21 +8,21 @@ on:
jobs:
lint:
name: Run ESLint
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: npm ci
- run: npm run lint
check-dist:
name: Check Distribution
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
env:
BUNDLE_FILE: "dist/index.js"
BUNDLE_COMMAND: "npm run bundle"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install
run: npm ci
@ -35,11 +35,11 @@ jobs:
check-inputs-outputs:
name: Check Input and Output enums
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
env:
IO_FILE: ./src/generated/inputs-outputs.ts
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install dependencies
run: npm ci

View file

@ -15,7 +15,7 @@ env:
jobs:
podman-pull:
name: Log in and pull image with Podman
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
@ -23,7 +23,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install latest podman
if: matrix.install_latest
@ -43,14 +43,14 @@ jobs:
buildah-pull:
name: Log in and pull image with Buildah
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
install_latest: [ true, false ]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install latest podman
if: matrix.install_latest
@ -69,14 +69,14 @@ jobs:
docker-pull:
name: Log in and pull image with Docker
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
install_latest: [ true, false ]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install latest podman
if: matrix.install_latest

View file

@ -12,9 +12,9 @@ on:
jobs:
markdown-link-check:
name: Check links in markdown
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
use-verbose-mode: true

View file

@ -1,24 +1,24 @@
name: Vulnerability Scan with CRDA
on:
push:
# push:
workflow_dispatch:
pull_request_target:
types: [ assigned, opened, synchronize, reopened, labeled, edited ]
schedule:
- cron: '0 0 * * *' # every day at midnight
# pull_request_target:
# types: [ assigned, opened, synchronize, reopened, labeled, edited ]
# schedule:
# - cron: '0 0 * * *' # every day at midnight
jobs:
crda-scan:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
name: Scan project vulnerability with CRDA
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '14'
node-version: '20'
- name: Install CRDA
uses: redhat-actions/openshift-tools-installer@v1

3
.gitignore vendored
View file

@ -1,2 +1,3 @@
node_modules/
out/
out/
.idea/

View file

@ -1,5 +1,14 @@
# podman-login Changelog
## v1.7
- Update action to run on Node20.https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/
## v1.6
- Update action/core dependency to 1.10.0
## v1.5
- Update action to run on Node16. https://github.blog/changelog/2022-05-20-actions-can-now-run-in-a-node-js-16-runtime/
## v1.4
- Add ability to login to AWS ECR repositories. More details at https://github.com/redhat-actions/podman-login/issues/23

View file

@ -25,6 +25,6 @@ inputs:
default: 'true'
runs:
using: 'node12'
using: 'node20'
main: 'dist/index.js'
post: 'dist/index.js'

17
dist/index.js vendored

File diff suppressed because one or more lines are too long

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

5518
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -2,7 +2,7 @@
"name": "podman-login",
"version": "1.0.0",
"engines": {
"node": "12"
"node": "20"
},
"description": "GitHub Action to log in against a container image registry",
"repository": {
@ -21,20 +21,21 @@
"author": "Red Hat",
"license": "MIT",
"dependencies": {
"@actions/core": "^1.2.6",
"@actions/exec": "^1.0.4",
"@actions/io": "^1.0.2",
"@aws-sdk/client-ecr": "^3.100.0"
"@actions/core": "^1.10.1",
"@actions/exec": "^1.1.1",
"@actions/io": "^1.1.3",
"@aws-sdk/client-ecr": "^3.535.0",
"@aws-sdk/util-base64": "^3.310.0"
},
"devDependencies": {
"@redhat-actions/action-io-generator": "^1.5.0",
"@redhat-actions/eslint-config": "^1.2.11",
"@redhat-actions/tsconfig": "^1.1.1",
"@types/node": "^12",
"@typescript-eslint/eslint-plugin": "^4.14.1",
"@typescript-eslint/parser": "^4.14.1",
"@vercel/ncc": "^0.25.1",
"eslint": "^7.18.0",
"typescript": "^4.0.5"
"@redhat-actions/eslint-config": "^1.3.2",
"@redhat-actions/tsconfig": "^1.2.0",
"@types/node": "^20",
"@typescript-eslint/eslint-plugin": "^7.2.0",
"@typescript-eslint/parser": "^7.2.0",
"@vercel/ncc": "^0.38.1",
"eslint": "^8.57.0",
"typescript": "^5.4.2"
}
}

View file

@ -71,12 +71,12 @@ async function run(): Promise<void> {
podmanAuthFilePath = authFilePath;
}
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) {
authFileDir = process.env.XDG_RUNTIME_DIR;
}
podmanAuthFilePath = path.join(authFileDir,
"containers", "auth.json");
podmanAuthFilePath = path.join(authFileDir, "containers", "auth.json");
}
const REGISTRY_AUTH_ENVVAR = "REGISTRY_AUTH_FILE";
core.info(`Exporting ${REGISTRY_AUTH_ENVVAR}=${podmanAuthFilePath}`);

View file

@ -69,5 +69,6 @@ export async function execute(
export async function getDockerConfigJson(): Promise<string> {
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; });
}