@@ -5,71 +5,71 @@ permissions:
55 packages : write
66
77on :
8- workflow_dispatch :
9- push :
10- tags :
11- - ' v* '
8+ workflow_dispatch :
9+ push :
10+ tags :
11+ - " v* "
1212
1313env :
1414 IMAGE_TAG : docker.io/botsudo/docker-openldap:latest
1515 PLATFORM : " linux/amd64,linux/arm/v7,linux/arm64/v8"
1616
1717jobs :
18- push_to_registry :
19- environment :
20- name : Docker Hub
21- url : https://hub.docker.com/r/botsudo/docker-openldap
22- name : Push Docker image to DockerHub and GitHub Container Registry
23- runs-on : ubuntu-latest
24- steps :
25- - name : Check out the repository
26- uses : actions/checkout@v4
27- - name : Login to DockerHub
28- uses : docker/login-action@v3
29- with :
30- registry : docker.io
31- username : ${{ secrets.DOCKER_REPOSITORY_LOGIN }}
32- password : ${{ secrets.DOCKER_REPOSITORY_PASSWORD }}
18+ push_to_registry :
19+ environment :
20+ name : Docker Hub
21+ url : https://hub.docker.com/r/botsudo/docker-openldap
22+ name : Push Docker image to DockerHub and GitHub Container Registry
23+ runs-on : ubuntu-latest
24+ steps :
25+ - name : Check out the repository
26+ uses : actions/checkout@v4
27+ - name : Login to DockerHub
28+ uses : docker/login-action@v3
29+ with :
30+ registry : docker.io
31+ username : ${{ secrets.DOCKER_REPOSITORY_LOGIN }}
32+ password : ${{ secrets.DOCKER_REPOSITORY_PASSWORD }}
3333
34- # https://github.com/docker/setup-qemu-action
35- - name : Set up QEMU
36- uses : docker/setup-qemu-action@v3
37- # https://github.com/docker/setup-buildx-action
38- - name : Set up Docker Buildx
39- uses : docker/setup-buildx-action@v3
34+ # https://github.com/docker/setup-qemu-action
35+ - name : Set up QEMU
36+ uses : docker/setup-qemu-action@v3
37+ # https://github.com/docker/setup-buildx-action
38+ - name : Set up Docker Buildx
39+ uses : docker/setup-buildx-action@v3
4040
41- - name : Build docker image
42- run : make docker-build
43- env :
44- # See: https://github.com/docker/buildx/issues/59
45- ACTION : push
46- DOCKER_BUILDKIT : 1
41+ - name : Build docker image
42+ run : make docker-build
43+ env :
44+ # See: https://github.com/docker/buildx/issues/59
45+ ACTION : push
46+ DOCKER_BUILDKIT : 1
4747
48- - name : Test docker image
49- run : make test
50- # Anyway the image is pushed ... because of the buildx issue
51- continue-on-error : true
52- env :
53- DOCKER_BUILDKIT : 1
54- COMPOSE_DOCKER_CLI_BUILD : 1
48+ - name : Test docker image
49+ run : make test
50+ # Anyway the image is pushed ... because of the buildx issue
51+ continue-on-error : true
52+ env :
53+ DOCKER_BUILDKIT : 1
54+ COMPOSE_DOCKER_CLI_BUILD : 1
5555
56- # - name: Sign and push docker image
57- # uses: sudo-bot/action-docker-sign@latest
58- # with:
59- # image-ref: "docker.io/botsudo/action-docker-compose:latest"
60- # private-key-id: "${{ secrets.DOCKER_PRIVATE_KEY_ID }}"
61- # private-key: ${{ secrets.DOCKER_PRIVATE_KEY }}
62- # private-key-passphrase: ${{ secrets.DOCKER_PRIVATE_KEY_PASSPHRASE }}
56+ # - name: Sign and push docker image
57+ # uses: sudo-bot/action-docker-sign@latest
58+ # with:
59+ # image-ref: "docker.io/botsudo/action-docker-compose:latest"
60+ # private-key-id: "${{ secrets.DOCKER_PRIVATE_KEY_ID }}"
61+ # private-key: ${{ secrets.DOCKER_PRIVATE_KEY }}
62+ # private-key-passphrase: ${{ secrets.DOCKER_PRIVATE_KEY_PASSPHRASE }}
6363
64- - name : Pull multi-platform image pushed by Docker buildx
65- run : docker pull $IMAGE_TAG
66- - name : Tag for GHCR
67- run : make docker-tag-ghcr
68- - name : Login to GitHub Container Registry
69- uses : docker/login-action@v3
70- with :
71- registry : ghcr.io
72- username : ${{ github.actor }}
73- password : ${{ secrets.GITHUB_TOKEN }}
74- - name : Push to GitHub Container Registry
75- run : make docker-push-ghcr
64+ - name : Pull multi-platform image pushed by Docker buildx
65+ run : docker pull $IMAGE_TAG
66+ - name : Tag for GHCR
67+ run : make docker-tag-ghcr
68+ - name : Login to GitHub Container Registry
69+ uses : docker/login-action@v3
70+ with :
71+ registry : ghcr.io
72+ username : ${{ github.actor }}
73+ password : ${{ secrets.GITHUB_TOKEN }}
74+ - name : Push to GitHub Container Registry
75+ run : make docker-push-ghcr
0 commit comments