Skip to content

Commit

Permalink
reorder validation
Browse files Browse the repository at this point in the history
alikhil committed Dec 6, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 92cc535 commit f41aa53
Showing 2 changed files with 10 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/mirror.yml
Original file line number Diff line number Diff line change
@@ -18,6 +18,14 @@ jobs:
packages: write

steps:
- name: Validate image
run: |
IMAGE="${{ github.event.inputs.image_name }}"
if [[ "$IMAGE" == *.* ]]; then
echo "Image name contains a domain, exiting. Only short dockerhub image names are allowed"
exit 1
fi
- name: Checkout repository
uses: actions/checkout@v4

@@ -33,13 +41,6 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Validate image
run: |
IMAGE="${{ github.event.inputs.image_name }}"
if [[ "$IMAGE" == *.* ]]; then
echo "Image name contains a domain, exiting. Only short dockerhub image names are allowed"
exit 1
fi
- name: Copy image to GHCR
env:
IMAGE: ${{ github.event.inputs.image_name }}
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# image-mirror

Dynamic dockerhub images mirror.

Check if is [there](https://github.com/orgs/1mgr/packages?repo_name=image-mirror) a mirror for the image you want to use.

0 comments on commit f41aa53

Please sign in to comment.