Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a5055cd007 | ||
|
|
3e397648f8 | ||
|
|
dc591110cc |
2
.github/workflows/push.yml
vendored
2
.github/workflows/push.yml
vendored
@@ -11,7 +11,7 @@ jobs:
|
||||
- name: GitHub Package Registry
|
||||
uses: aevea/action-kaniko@master
|
||||
with:
|
||||
registry: docker.pkg.github.com
|
||||
registry: ghcr.io
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
image: kaniko
|
||||
cache: true
|
||||
|
||||
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -22,7 +22,7 @@ jobs:
|
||||
- name: GitHub Package Registry
|
||||
uses: aevea/action-kaniko@master
|
||||
with:
|
||||
registry: docker.pkg.github.com
|
||||
registry: ghcr.io
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
image: kaniko
|
||||
cache: true
|
||||
|
||||
@@ -83,7 +83,7 @@ with:
|
||||
cache_registry: aevea/cache
|
||||
```
|
||||
|
||||
### [docker.pkg.github.com](https://github.com/features/packages)
|
||||
### [ghcr.io](https://github.com/features/packages)
|
||||
|
||||
GitHub's docker registry is a bit special. It doesn't allow top-level images, so this action will prefix any image with the GitHub namespace.
|
||||
If you want to push your image like `aevea/action-kaniko/kaniko`, you'll only need to pass `kaniko` to this action.
|
||||
@@ -93,7 +93,7 @@ passed by default, it will have to be explicitly set up.
|
||||
|
||||
```yaml
|
||||
with:
|
||||
registry: docker.pkg.github.com
|
||||
registry: ghcr.io
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
image: kaniko
|
||||
```
|
||||
@@ -104,7 +104,7 @@ cache layers to that image instead
|
||||
|
||||
```yaml
|
||||
with:
|
||||
registry: docker.pkg.github.com
|
||||
registry: ghcr.io
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
image: kaniko
|
||||
cache: true
|
||||
@@ -167,7 +167,7 @@ Example:
|
||||
|
||||
```yaml
|
||||
with:
|
||||
registry: docker.pkg.github.com
|
||||
registry: ghcr.io
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
image: kaniko
|
||||
strip_tag_prefix: pre-
|
||||
|
||||
@@ -31,7 +31,7 @@ ensure "${IMAGE}" "image"
|
||||
ensure "${TAG}" "tag"
|
||||
ensure "${CONTEXT_PATH}" "path"
|
||||
|
||||
if [ "$REGISTRY" == "docker.pkg.github.com" ]; then
|
||||
if [ "$REGISTRY" == "ghcr.io" ]; then
|
||||
IMAGE_NAMESPACE="$(echo $GITHUB_REPOSITORY | tr '[:upper:]' '[:lower:]')"
|
||||
export IMAGE="$IMAGE_NAMESPACE/$IMAGE"
|
||||
export REPOSITORY="$IMAGE_NAMESPACE/$REPOSITORY"
|
||||
@@ -91,8 +91,8 @@ EOF
|
||||
if [ ! -z $INPUT_SKIP_UNCHANGED_DIGEST ]; then
|
||||
export DIGEST=$(cat digest)
|
||||
|
||||
if [ "$REGISTRY" == "docker.pkg.github.com" ]; then
|
||||
wget -q -O manifest --header "Authorization: Basic $(echo -n $USERNAME:$PASSWORD | base64 | tr -d \\n)" https://docker.pkg.github.com/v2/$REPOSITORY/manifests/latest || true
|
||||
if [ "$REGISTRY" == "ghcr.io" ]; then
|
||||
wget -q -O manifest --header "Authorization: Basic $(echo -n $USERNAME:$PASSWORD | base64 | tr -d \\n)" https://ghcr.io/v2/$REPOSITORY/manifests/latest || true
|
||||
export REMOTE="sha256:$(cat manifest | sha256sum | awk '{ print $1 }')"
|
||||
else
|
||||
export REMOTE=$(reg digest -u $USERNAME -p $PASSWORD $REGISTRY/$REPOSITORY | tail -1)
|
||||
|
||||
Reference in New Issue
Block a user