mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-06-18 06:13:17 -04:00
Update BuildImage.yml
This commit is contained in:
@@ -15,14 +15,24 @@ jobs:
|
||||
|
||||
- name: Build image
|
||||
run: |
|
||||
docker build --no-cache -t ${{ github.sha }} .
|
||||
# Set version
|
||||
DOTNET_JSON="$(curl --retry 5 -sX GET https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases-index.json)"
|
||||
DOTNET_VERSIONS="$(echo $DOTNET_JSON | jq -r '."releases-index"[] | select(."support-phase"=="lts") | ."latest-sdk"' | tr '\n' ' ' | head -c -1)"
|
||||
DOTNET_TAG="$(echo $DOTNET_VERSIONS | tr ' ' '_')"
|
||||
echo "DOTNET_TAG=${{ secrets.DOTNET_TAG }}" >> $GITHUB_ENV
|
||||
# Build image
|
||||
docker build --no-cache --build-arg DOTNET_VERSIONS="${DOTNET_VERSIONS}" -t ${{ github.sha }} .
|
||||
|
||||
- name: Tag image
|
||||
if: ${{ github.ref == format('refs/heads/{0}-{1}', env.BASEIMAGE, env.MODNAME) }}
|
||||
run: |
|
||||
docker tag ${{ github.sha }} ${ENDPOINT}:${BASEIMAGE}-${MODNAME}
|
||||
docker tag ${{ github.sha }} ${ENDPOINT}:${BASEIMAGE}-${MODNAME}-${{ env.DOTNET_TAG }}
|
||||
docker tag ${{ github.sha }} ${ENDPOINT}:${BASEIMAGE}-${MODNAME}-${{ env.DOTNET_TAG }}-${{ github.sha }}
|
||||
docker tag ${{ github.sha }} ${ENDPOINT}:${BASEIMAGE}-${MODNAME}-${{ github.sha }}
|
||||
docker tag ${{ github.sha }} ghcr.io/${ENDPOINT}:${BASEIMAGE}-${MODNAME}
|
||||
docker tag ${{ github.sha }} ghcr.io/${ENDPOINT}:${BASEIMAGE}-${MODNAME}-${{ env.DOTNET_TAG }}
|
||||
docker tag ${{ github.sha }} ghcr.io/${ENDPOINT}:${BASEIMAGE}-${MODNAME}-${{ env.DOTNET_TAG }}-${{ github.sha }}
|
||||
docker tag ${{ github.sha }} ghcr.io/${ENDPOINT}:${BASEIMAGE}-${MODNAME}-${{ github.sha }}
|
||||
|
||||
- name: Credential check
|
||||
@@ -47,6 +57,8 @@ jobs:
|
||||
- name: Push tags to GitHub Container Registry
|
||||
if: ${{ github.ref == format('refs/heads/{0}-{1}', env.BASEIMAGE, env.MODNAME) && env.CR_USER && env.CR_PAT }}
|
||||
run: |
|
||||
docker push ghcr.io/${ENDPOINT}:${BASEIMAGE}-${MODNAME}-${{ env.DOTNET_TAG }}
|
||||
docker push ghcr.io/${ENDPOINT}:${BASEIMAGE}-${MODNAME}-${{ env.DOTNET_TAG }}-${{ github.sha }}
|
||||
docker push ghcr.io/${ENDPOINT}:${BASEIMAGE}-${MODNAME}-${{ github.sha }}
|
||||
docker push ghcr.io/${ENDPOINT}:${BASEIMAGE}-${MODNAME}
|
||||
|
||||
@@ -58,5 +70,7 @@ jobs:
|
||||
- name: Push tags to DockerHub
|
||||
if: ${{ github.ref == format('refs/heads/{0}-{1}', env.BASEIMAGE, env.MODNAME) && env.DOCKERUSER && env.DOCKERPASS }}
|
||||
run: |
|
||||
docker push ${ENDPOINT}:${BASEIMAGE}-${MODNAME}-${{ env.DOTNET_TAG }}
|
||||
docker push ${ENDPOINT}:${BASEIMAGE}-${MODNAME}-${{ env.DOTNET_TAG }}-${{ github.sha }}
|
||||
docker push ${ENDPOINT}:${BASEIMAGE}-${MODNAME}-${{ github.sha }}
|
||||
docker push ${ENDPOINT}:${BASEIMAGE}-${MODNAME}
|
||||
|
||||
Reference in New Issue
Block a user