Normalize repo name
This commit is contained in:
1 parent
23377b2ccb
commit
63c26f6606
1 file changed
+8
-4
@@ -9,6 +9,10 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Normalize repo name
|
||||||
|
run: |
|
||||||
|
REPOSITORY_LC=$(echo "${{ gitea.repository }}" | tr '[:upper:]' '[:lower:]')
|
||||||
|
echo "REPOSITORY_LC=REPOSITORY_LC" >> $GITHUB_ENV
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Login to Registry
|
- name: Login to Registry
|
||||||
@@ -23,17 +27,17 @@ jobs:
|
|||||||
REGESTRY: eiche:3000
|
REGESTRY: eiche:3000
|
||||||
run: |
|
run: |
|
||||||
# Build the image with the commit hash tag
|
# Build the image with the commit hash tag
|
||||||
docker build -t ${REGISTRY}/${{ gitea.repository }}:${GITHUB_RUN_NUMBER} .
|
docker build -t ${REGISTRY}/${REPOSITORY_LC}:${GITHUB_RUN_NUMBER} .
|
||||||
|
|
||||||
# Tag the same image as "latest"
|
# Tag the same image as "latest"
|
||||||
docker tag ${REGISTRY}/${{ gitea.repository }}:${GITHUB_RUN_NUMBER} ${REGISTRY}/${{ gitea.repository }}:latest
|
docker tag ${REGISTRY}/${REPOSITORY_LC}:${GITHUB_RUN_NUMBER} ${REGISTRY}/${REPOSITORY_LC}:latest
|
||||||
|
|
||||||
- name: Push Docker Images
|
- name: Push Docker Images
|
||||||
env:
|
env:
|
||||||
REGESTRY: eiche:3000
|
REGESTRY: eiche:3000
|
||||||
run: |
|
run: |
|
||||||
docker push ${REGISTRY}/${{ gitea.repository }}:${GITHUB_RUN_NUMBER}
|
docker push ${REGISTRY}/${REPOSITORY_LC}:${GITHUB_RUN_NUMBER}
|
||||||
docker push ${REGISTRY}/${{ gitea.repository }}:latest
|
docker push ${REGISTRY}/${REPOSITORY_LC}:latest
|
||||||
|
|
||||||
- name: Log out from registry
|
- name: Log out from registry
|
||||||
if: always()
|
if: always()
|
||||||
|
|||||||