Skip to content

Commit 0bea4d4

Browse files
committed
moodle
1 parent 5f1d703 commit 0bea4d4

2 files changed

Lines changed: 20 additions & 10 deletions

File tree

.github/workflows/docker.yml

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,22 +67,32 @@ jobs:
6767
echo "Building and pushing Docker image for $APP with tags: $TAGS"
6868
echo "TAGS=$TAGS" >> $GITHUB_ENV
6969
echo "APP=$APP" >> $GITHUB_ENV
70-
echo "DOCKERFILE=Dockerfile" >> $GITHUB_ENV
7170
echo "DIRECTORY=apps/$APP" >> $GITHUB_ENV
7271
echo "README=apps/$APP/README.md" >> $GITHUB_ENV
7372
74-
- name: Build & push Docker image
75-
uses: mr-smithers-excellent/docker-build-push@v6
73+
- name: Set up Docker Buildx
74+
uses: docker/setup-buildx-action@v2
75+
76+
- name: Log in to Docker Hub
77+
uses: docker/login-action@v2
7678
with:
77-
image: websoft9dev/${{env.APP}}
78-
tags: ${{env.TAGS}}
79-
registry: docker.io
80-
directory: ${{env.DIRECTORY}}
81-
multiPlatform: true
82-
platform: linux/amd64
8379
username: ${{ secrets.DOCKER_USERNAME }}
8480
password: ${{ secrets.DOCKER_PASSWORD }}
8581

82+
- name: Prepare Docker tags
83+
id: meta
84+
run: |
85+
TAGS_LIST=$(echo "${{env.TAGS}}" | tr ',' '\n' | sed "s|^|websoft9dev/${{env.APP}}:|" | tr '\n' ',' | sed 's/,$//')
86+
echo "tags=$TAGS_LIST" >> $GITHUB_OUTPUT
87+
88+
- name: Build and push Docker image
89+
uses: docker/build-push-action@v4
90+
with:
91+
context: ${{env.DIRECTORY}}
92+
push: true
93+
tags: ${{steps.meta.outputs.tags}}
94+
platforms: linux/amd64
95+
8696
- name: Docker Hub Description
8797
uses: peter-evans/dockerhub-description@v3
8898
with:

apps/moodle/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Moodle Dockerfile based on official php:apache image
1+
# Moodle Dockerfile based on official php:apache
22
# Reference: https://docs.moodle.org/501/en/Installation_quick_guide
33

44
FROM php:8.2-apache

0 commit comments

Comments
 (0)