mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-06-28 19:23:43 -04:00
37 lines
1.2 KiB
YAML
37 lines
1.2 KiB
YAML
os: linux
|
|
|
|
language: shell
|
|
|
|
branches:
|
|
only:
|
|
- code-server-powershell
|
|
|
|
services:
|
|
- docker
|
|
|
|
env:
|
|
global:
|
|
- DOCKERHUB="linuxserver/mods"
|
|
- BASEIMAGE="code-server"
|
|
- MODNAME="powershell"
|
|
|
|
jobs:
|
|
include:
|
|
- stage: PR-BuildImage
|
|
if: (type IN (pull_request))
|
|
script:
|
|
# Build image
|
|
- docker build --no-cache -t ${DOCKERHUB}:${BASEIMAGE}-${MODNAME}-${TRAVIS_COMMIT} .
|
|
- stage: BuildImage
|
|
if: (NOT (type IN (pull_request)))
|
|
script:
|
|
# Set version
|
|
- PS_VERSION=$(curl -sX GET "https://api.github.com/repos/PowerShell/PowerShell/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]' | awk '{print substr($1,2); }')
|
|
# Build image
|
|
- docker build --no-cache --build-arg PS_VERSION=${PS_VERSION} -t ${DOCKERHUB}:${BASEIMAGE}-${MODNAME}-${PS_VERSION}-${TRAVIS_COMMIT} .
|
|
- docker tag ${DOCKERHUB}:${BASEIMAGE}-${MODNAME}-${PS_VERSION}-${TRAVIS_COMMIT} ${DOCKERHUB}:${BASEIMAGE}-${MODNAME}
|
|
# Login to DockerHub
|
|
- echo $DOCKERPASS | docker login -u $DOCKERUSER --password-stdin
|
|
# Push all of the tags
|
|
- docker push ${DOCKERHUB}:${BASEIMAGE}-${MODNAME}-${PS_VERSION}-${TRAVIS_COMMIT}
|
|
- docker push ${DOCKERHUB}:${BASEIMAGE}-${MODNAME} |