@@ -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 :
0 commit comments