mirror of
https://github.com/Websoft9/websoft9.git
synced 2025-01-23 09:20:20 +08:00
commit
91689ef278
18
.github/workflows/docker.yml
vendored
18
.github/workflows/docker.yml
vendored
@ -11,7 +11,7 @@ name: Build image to DockerHub
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main, dev] # Include dev branch
|
||||||
paths:
|
paths:
|
||||||
- "docker/*/Dockerfile"
|
- "docker/*/Dockerfile"
|
||||||
|
|
||||||
@ -38,8 +38,7 @@ jobs:
|
|||||||
needs: setup
|
needs: setup
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
# You can set it to choice where download from
|
MEDIA_FROM: "source" # You can set it to choice where download from
|
||||||
MEDIA_FROM: "source"
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix: ${{fromJson(needs.setup.outputs.matrix)}}
|
matrix: ${{fromJson(needs.setup.outputs.matrix)}}
|
||||||
steps:
|
steps:
|
||||||
@ -53,9 +52,15 @@ jobs:
|
|||||||
APP=${{ matrix.app }}
|
APP=${{ matrix.app }}
|
||||||
TAG=$(grep 'LABEL version' "docker/$APP/Dockerfile" | cut -d'"' -f2 | xargs)
|
TAG=$(grep 'LABEL version' "docker/$APP/Dockerfile" | cut -d'"' -f2 | xargs)
|
||||||
echo $APP version is $TAG
|
echo $APP version is $TAG
|
||||||
if [[ "$TAG" == *"-"* ]]; then
|
|
||||||
TAGS="$TAG"
|
# Determine the channel based on the branch and TAG
|
||||||
|
if [[ $GITHUB_REF == *"refs/heads/dev"* ]]; then
|
||||||
echo "CHANNEL=dev" >> $GITHUB_ENV
|
echo "CHANNEL=dev" >> $GITHUB_ENV
|
||||||
|
TAGS="$TAG" # Use the TAG directly for dev
|
||||||
|
else
|
||||||
|
if [[ "$TAG" == *"-"* ]]; then
|
||||||
|
echo "CHANNEL=rc" >> $GITHUB_ENV
|
||||||
|
TAGS="$TAG"
|
||||||
else
|
else
|
||||||
echo "CHANNEL=release" >> $GITHUB_ENV
|
echo "CHANNEL=release" >> $GITHUB_ENV
|
||||||
IFS='.' read -ra PARTS <<< "$TAG"
|
IFS='.' read -ra PARTS <<< "$TAG"
|
||||||
@ -70,6 +75,8 @@ jobs:
|
|||||||
TAGS="${TAGS},${TAG_PART}"
|
TAGS="${TAGS},${TAG_PART}"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Building and pushing Docker image for $APP with tags: $TAGS"
|
echo "Building and pushing Docker image for $APP with tags: $TAGS"
|
||||||
echo "TAGS=$TAGS" >> $GITHUB_ENV
|
echo "TAGS=$TAGS" >> $GITHUB_ENV
|
||||||
echo "APP=$APP" >> $GITHUB_ENV
|
echo "APP=$APP" >> $GITHUB_ENV
|
||||||
@ -112,6 +119,7 @@ jobs:
|
|||||||
repository: websoft9/docker-library
|
repository: websoft9/docker-library
|
||||||
event-type: custom_event
|
event-type: custom_event
|
||||||
token: ${{secrets.MYGITHUB_ADMIN_TOKEN}}
|
token: ${{secrets.MYGITHUB_ADMIN_TOKEN}}
|
||||||
|
ref: ${{ github.ref }}
|
||||||
if: env.APP == 'apphub'
|
if: env.APP == 'apphub'
|
||||||
|
|
||||||
# release media step1
|
# release media step1
|
||||||
|
@ -11,8 +11,8 @@
|
|||||||
},
|
},
|
||||||
"OS": {
|
"OS": {
|
||||||
"Fedora": [
|
"Fedora": [
|
||||||
"40",
|
"41",
|
||||||
"39"
|
"40"
|
||||||
],
|
],
|
||||||
"RedHat": [
|
"RedHat": [
|
||||||
"9",
|
"9",
|
||||||
|
Loading…
Reference in New Issue
Block a user