mirror of
https://github.com/redhat-actions/push-to-registry.git
synced 2025-03-31 23:07:47 +02:00
Compare commits
6 commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
5ed88d269c | ||
![]() |
7d220213a5 | ||
![]() |
0fa2dca2e8 | ||
![]() |
e85426e5e2 | ||
![]() |
ded55cf56a | ||
![]() |
eaa95b72b2 |
20 changed files with 1291 additions and 6667 deletions
4
.github/workflows/check-lowercase.yaml
vendored
4
.github/workflows/check-lowercase.yaml
vendored
|
@ -17,7 +17,7 @@ env:
|
|||
jobs:
|
||||
push-ghcr:
|
||||
name: Build and push image
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
|
@ -26,7 +26,7 @@ jobs:
|
|||
steps:
|
||||
# Checkout push-to-registry action github repository
|
||||
- name: Checkout Push to Registry action
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install latest podman
|
||||
if: matrix.install_latest
|
||||
|
|
10
.github/workflows/ci.yml
vendored
10
.github/workflows/ci.yml
vendored
|
@ -9,18 +9,18 @@ jobs:
|
|||
runs-on: ubuntu-20.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
|
||||
|
@ -33,11 +33,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
|
||||
|
|
4
.github/workflows/ghcr-push.yaml
vendored
4
.github/workflows/ghcr-push.yaml
vendored
|
@ -17,7 +17,7 @@ env:
|
|||
jobs:
|
||||
push-ghcr:
|
||||
name: Build and push image
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
|
@ -26,7 +26,7 @@ jobs:
|
|||
steps:
|
||||
# Checkout push-to-registry action github repository
|
||||
- name: Checkout Push to Registry action
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install latest podman
|
||||
if: matrix.install_latest
|
||||
|
|
4
.github/workflows/link_check.yml
vendored
4
.github/workflows/link_check.yml
vendored
|
@ -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
|
||||
|
|
6
.github/workflows/manifest-build-push.yaml
vendored
6
.github/workflows/manifest-build-push.yaml
vendored
|
@ -17,7 +17,7 @@ env:
|
|||
jobs:
|
||||
push-quay:
|
||||
name: Build and push manifest
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
|
@ -26,7 +26,7 @@ jobs:
|
|||
steps:
|
||||
# Checkout push-to-registry action github repository
|
||||
- name: Checkout Push to Registry action
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install latest podman
|
||||
if: matrix.install_latest
|
||||
|
@ -51,7 +51,7 @@ jobs:
|
|||
|
||||
- name: Build Image
|
||||
id: build_image
|
||||
uses: redhat-actions/buildah-build@main
|
||||
uses: redhat-actions/buildah-build@v2
|
||||
with:
|
||||
image: ${{ env.IMAGE_NAME }}
|
||||
tags: ${{ env.IMAGE_TAGS }}
|
||||
|
|
4
.github/workflows/multiple-build.yaml
vendored
4
.github/workflows/multiple-build.yaml
vendored
|
@ -17,7 +17,7 @@ jobs:
|
|||
build:
|
||||
name: |-
|
||||
Build with ${{ matrix.build_with }} and push${{ matrix.fully_qualified_image_name_tag && ' FQIN' || '' }} (latest: ${{ matrix.install_latest }})
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
|
@ -29,7 +29,7 @@ jobs:
|
|||
|
||||
# Checkout push-to-registry action github repository
|
||||
- name: Checkout Push to Registry action
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install latest podman
|
||||
if: matrix.install_latest
|
||||
|
|
4
.github/workflows/quay-push.yaml
vendored
4
.github/workflows/quay-push.yaml
vendored
|
@ -17,7 +17,7 @@ env:
|
|||
jobs:
|
||||
push-quay:
|
||||
name: Build and push image
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
|
@ -26,7 +26,7 @@ jobs:
|
|||
steps:
|
||||
# Checkout push-to-registry action github repository
|
||||
- name: Checkout Push to Registry action
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install latest podman
|
||||
if: matrix.install_latest
|
||||
|
|
18
.github/workflows/security_scan.yml
vendored
18
.github/workflows/security_scan.yml
vendored
|
@ -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
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '14'
|
||||
node-version: '20'
|
||||
|
||||
- name: Install CRDA
|
||||
uses: redhat-actions/openshift-tools-installer@v1
|
||||
|
|
4
.github/workflows/verify-login-push.yml
vendored
4
.github/workflows/verify-login-push.yml
vendored
|
@ -17,7 +17,7 @@ env:
|
|||
jobs:
|
||||
login-and-push:
|
||||
name: Login and push image to Quay.io
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
|
@ -27,7 +27,7 @@ jobs:
|
|||
|
||||
# Checkout push-to-registry action github repository
|
||||
- name: Checkout Push to Registry action
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install latest podman
|
||||
if: matrix.install_latest
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
# push-to-registry Changelog
|
||||
|
||||
## v2.8
|
||||
- Update action to run on Node20. https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/
|
||||
|
||||
## v2.7.1
|
||||
- Don't add docker.io prefix to ECR images. [#69](https://github.com/redhat-actions/push-to-registry/pull/69)
|
||||
|
||||
|
|
10
README.md
10
README.md
|
@ -101,10 +101,10 @@ on: [ push ]
|
|||
jobs:
|
||||
build:
|
||||
name: Build and push image
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Build Image
|
||||
id: build-image
|
||||
|
@ -144,13 +144,13 @@ If the image to push is present in both the Docker and Podman image storage, the
|
|||
If the action pulled an image from the Docker image storage into the Podman storage, it will be cleaned up from the Podman storage before the action exits.
|
||||
|
||||
## Note about GitHub runners and Podman
|
||||
We recommend using `runs-on: ubuntu-20.04` since it has a newer version of Podman.
|
||||
We recommend using `runs-on: ubuntu-22.04` since it has a newer version of Podman.
|
||||
|
||||
If you are on `ubuntu-18.04` or any other older versions of ubuntu your workflow will use an older version of Podman and may encounter issues such as [#26](https://github.com/redhat-actions/push-to-registry/issues/26).
|
||||
If you are on `ubuntu-20.04` or any other older versions of ubuntu your workflow will use an older version of Podman and may encounter issues such as [#26](https://github.com/redhat-actions/push-to-registry/issues/26).
|
||||
|
||||
## Troubleshooting
|
||||
Note that quay.io repositories are private by default.<br>
|
||||
|
||||
This means that if you push an image for the first time, you will have to authenticate before pulling it, or go to the repository's settings and change its visibility.
|
||||
|
||||
Simiarly, if you receive a 403 Forbidden from GHCR, you may have to update the Package Settings. Refer to [this issue](https://github.com/redhat-actions/push-to-registry/issues/52).
|
||||
Similarly, if you receive a 403 Forbidden from GHCR, you may have to update the Package Settings. Refer to [this issue](https://github.com/redhat-actions/push-to-registry/issues/52).
|
||||
|
|
|
@ -11,7 +11,7 @@ inputs:
|
|||
tags:
|
||||
description: |
|
||||
'The tag or tags of the image/manifest to push.
|
||||
For multiple tags, seperate by whitespace. For example, "latest v1"'
|
||||
For multiple tags, separate by whitespace. For example, "latest v1"'
|
||||
required: false
|
||||
default: 'latest'
|
||||
registry:
|
||||
|
@ -47,5 +47,5 @@ outputs:
|
|||
registry-paths:
|
||||
description: 'A JSON array of registry paths to which the tag(s) were pushed'
|
||||
runs:
|
||||
using: 'node16'
|
||||
using: 'node20'
|
||||
main: 'dist/index.js'
|
||||
|
|
4
dist/index.js
vendored
4
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
3911
dist/sourcemap-register.js
vendored
3911
dist/sourcemap-register.js
vendored
File diff suppressed because one or more lines are too long
3925
package-lock.json
generated
3925
package-lock.json
generated
File diff suppressed because it is too large
Load diff
27
package.json
27
package.json
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "push-to-registry",
|
||||
"version": "0.0.1",
|
||||
"version": "2.0.0",
|
||||
"description": "Action to push images to registry",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
@ -8,26 +8,27 @@
|
|||
"bundle": "ncc build src/index.ts --source-map --minify",
|
||||
"clean": "rm -rf out/ dist/",
|
||||
"lint": "eslint . --max-warnings=0",
|
||||
"generate-ios": "npx action-io-generator -w -o ./src/generated/inputs-outputs.ts",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"author": "Red Hat",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.9.1",
|
||||
"@actions/exec": "^1.1.0",
|
||||
"@actions/io": "^1.0.2",
|
||||
"ini": "^2.0.0"
|
||||
"@actions/core": "^1.10.1",
|
||||
"@actions/exec": "^1.1.1",
|
||||
"@actions/io": "^1.1.3",
|
||||
"ini": "^4.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@redhat-actions/action-io-generator": "^1.5.0",
|
||||
"@redhat-actions/eslint-config": "^1.3.2",
|
||||
"@redhat-actions/tsconfig": "^1.1.1",
|
||||
"@types/ini": "^1.3.30",
|
||||
"@types/node": "^12.12.7",
|
||||
"@typescript-eslint/eslint-plugin": "^4.22.0",
|
||||
"@typescript-eslint/parser": "^4.22.0",
|
||||
"@vercel/ncc": "^0.25.1",
|
||||
"eslint": "^7.18.0",
|
||||
"typescript": "4.2"
|
||||
"@redhat-actions/tsconfig": "^1.2.0",
|
||||
"@types/ini": "^4.1.0",
|
||||
"@types/node": "^20.11.24",
|
||||
"@typescript-eslint/eslint-plugin": "^7.1.1",
|
||||
"@typescript-eslint/parser": "^7.1.1",
|
||||
"@vercel/ncc": "^0.38.1",
|
||||
"eslint": "^8.57.0",
|
||||
"typescript": "5.3"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ export enum Inputs {
|
|||
REGISTRY = "registry",
|
||||
/**
|
||||
* 'The tag or tags of the image/manifest to push.
|
||||
* For multiple tags, seperate by whitespace. For example, "latest v1"'
|
||||
* For multiple tags, separate by whitespace. For example, "latest v1"'
|
||||
* Required: false
|
||||
* Default: "latest"
|
||||
*/
|
||||
|
|
|
@ -310,7 +310,9 @@ async function pullImageFromDocker(): Promise<ImageStorageCheckResult> {
|
|||
}
|
||||
}
|
||||
catch (err) {
|
||||
core.warning(err);
|
||||
if (err instanceof Error) {
|
||||
core.debug(err.message);
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
|
@ -340,7 +342,9 @@ async function checkImageInPodman(): Promise<ImageStorageCheckResult> {
|
|||
}
|
||||
}
|
||||
catch (err) {
|
||||
core.debug(err);
|
||||
if (err instanceof Error) {
|
||||
core.debug(err.message);
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
|
|
|
@ -54,7 +54,9 @@ export async function findFuseOverlayfsPath(): Promise<string | undefined> {
|
|||
fuseOverlayfsPath = await io.which("fuse-overlayfs");
|
||||
}
|
||||
catch (err) {
|
||||
core.debug(err);
|
||||
if (err instanceof Error) {
|
||||
core.debug(err.message);
|
||||
}
|
||||
}
|
||||
|
||||
return fuseOverlayfsPath;
|
||||
|
|
Loading…
Add table
Reference in a new issue