mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-06-17 13:52:56 -04:00
versioned updates, init cleaned up
This commit is contained in:
@@ -3,9 +3,9 @@ name: Build Image
|
||||
on: [push, pull_request, workflow_dispatch]
|
||||
|
||||
env:
|
||||
ENDPOINT: "linuxserver/mods" #don't modify
|
||||
BASEIMAGE: "code-server" #replace
|
||||
MODNAME: "julia" #replace
|
||||
ENDPOINT: "linuxserver/mods"
|
||||
BASEIMAGE: "code-server"
|
||||
MODNAME: "julia"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -15,14 +15,21 @@ jobs:
|
||||
|
||||
- name: Build image
|
||||
run: |
|
||||
docker build --no-cache -t ${{ github.sha }} .
|
||||
# Set version
|
||||
JULIA_VERSION=$(curl -sfX GET "https://api.github.com/repos/JuliaLang/julia/releases/latest" | jq -r '. | .tag_name' | sed 's|^v||')
|
||||
echo "JULIA_VERSION=${JULIA_VERSION}" >> $GITHUB_ENV
|
||||
docker build --no-cache --build-arg JULIA_VERSION="${JULIA_VERSION}" -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.JULIA_VERSION }}
|
||||
docker tag ${{ github.sha }} ${ENDPOINT}:${BASEIMAGE}-${MODNAME}-${{ env.JULIA_VERSION }}-${{ 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.JULIA_VERSION }}
|
||||
docker tag ${{ github.sha }} ghcr.io/${ENDPOINT}:${BASEIMAGE}-${MODNAME}-${{ env.JULIA_VERSION }}-${{ github.sha }}
|
||||
docker tag ${{ github.sha }} ghcr.io/${ENDPOINT}:${BASEIMAGE}-${MODNAME}-${{ github.sha }}
|
||||
|
||||
- name: Credential check
|
||||
@@ -47,6 +54,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.JULIA_VERSION }}
|
||||
docker push ghcr.io/${ENDPOINT}:${BASEIMAGE}-${MODNAME}-${{ env.JULIA_VERSION }}-${{ github.sha }}
|
||||
docker push ghcr.io/${ENDPOINT}:${BASEIMAGE}-${MODNAME}-${{ github.sha }}
|
||||
docker push ghcr.io/${ENDPOINT}:${BASEIMAGE}-${MODNAME}
|
||||
|
||||
@@ -58,5 +67,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.JULIA_VERSION }}
|
||||
docker push ${ENDPOINT}:${BASEIMAGE}-${MODNAME}-${{ env.JULIA_VERSION }}-${{ github.sha }}
|
||||
docker push ${ENDPOINT}:${BASEIMAGE}-${MODNAME}-${{ github.sha }}
|
||||
docker push ${ENDPOINT}:${BASEIMAGE}-${MODNAME}
|
||||
|
||||
Reference in New Issue
Block a user