diff --git a/.github/workflows/mirror.yml b/.github/workflows/mirror.yml index 7e4a3df..d42df0b 100644 --- a/.github/workflows/mirror.yml +++ b/.github/workflows/mirror.yml @@ -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 }} diff --git a/README.md b/README.md index 93473f0..1c9d7d3 100644 --- a/README.md +++ b/README.md @@ -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.