diff --git a/.github/workflows/docker-hub-publish-base.yml b/.github/workflows/docker-hub-publish-base.yml index 0b18ff9..971ed0a 100644 --- a/.github/workflows/docker-hub-publish-base.yml +++ b/.github/workflows/docker-hub-publish-base.yml @@ -12,6 +12,11 @@ jobs: - name: Build and publish base image to harbor uses: IMIO/buildout.pm/actions/harbor@mod-gh-actions-PMIND-47 with: + DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} + DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} + HARBOR_URL: ${{ secrets.HARBOR_URL }} + DELIB_HARBOR_USERNAME: ${{ secrets.DELIB_HARBOR_USERNAME }} + DELIB_HARBOR_PASSWORD: ${{ secrets.DELIB_HARBOR_PASSWORD }} tags: | imiobe/iadelib:base "${{ secrets.HARBOR_URL }}/delib/iadelib:base" diff --git a/.github/workflows/docker-hub-publish.yml b/.github/workflows/docker-hub-publish.yml index 4bf84f7..9c1d1ed 100644 --- a/.github/workflows/docker-hub-publish.yml +++ b/.github/workflows/docker-hub-publish.yml @@ -10,6 +10,11 @@ jobs: - name: Build latest uses: IMIO/buildout.pm/actions/harbor@master with: + DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} + DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} + HARBOR_URL: ${{ secrets.HARBOR_URL }} + DELIB_HARBOR_USERNAME: ${{ secrets.DELIB_HARBOR_USERNAME }} + DELIB_HARBOR_PASSWORD: ${{ secrets.DELIB_HARBOR_PASSWORD }} tags: | imiobe/iadelib:latest "${{ secrets.HARBOR_URL }}/delib/iadelib:latest" @@ -17,6 +22,11 @@ jobs: - name: Build and publish dev image uses: IMIO/buildout.pm/actions/harbor@master with: + DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} + DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} + HARBOR_URL: ${{ secrets.HARBOR_URL }} + DELIB_HARBOR_USERNAME: ${{ secrets.DELIB_HARBOR_USERNAME }} + DELIB_HARBOR_PASSWORD: ${{ secrets.DELIB_HARBOR_PASSWORD }} tags: imiobe/iadelib:dev dockerfile: ./docker/Dockerfile-dev profile: communes-dev diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 67eb44b..667dde7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,6 +11,11 @@ jobs: - name: Build and publish communes image to harbor uses: IMIO/buildout.pm/actions/harbor@master with: + DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} + DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} + HARBOR_URL: ${{ secrets.HARBOR_URL }} + DELIB_HARBOR_USERNAME: ${{ secrets.DELIB_HARBOR_USERNAME }} + DELIB_HARBOR_PASSWORD: ${{ secrets.DELIB_HARBOR_PASSWORD }} tags: | "imiobe/iadelib:${{ github.ref_name }}" "imiobe/iadelib:communes-${{ github.ref_name }}" @@ -23,6 +28,11 @@ jobs: - name: Build and publish bep image to harbor uses: IMIO/buildout.pm/actions/harbor@master with: + DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} + DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} + HARBOR_URL: ${{ secrets.HARBOR_URL }} + DELIB_HARBOR_USERNAME: ${{ secrets.DELIB_HARBOR_USERNAME }} + DELIB_HARBOR_PASSWORD: ${{ secrets.DELIB_HARBOR_PASSWORD }} profile: bep tags: | "imiobe/iadelib:bep-${{ github.ref_name }}" @@ -34,6 +44,11 @@ jobs: - name: Build and publish charleroi image to harbor uses: IMIO/buildout.pm/actions/harbor@master with: + DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} + DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} + HARBOR_URL: ${{ secrets.HARBOR_URL }} + DELIB_HARBOR_USERNAME: ${{ secrets.DELIB_HARBOR_USERNAME }} + DELIB_HARBOR_PASSWORD: ${{ secrets.DELIB_HARBOR_PASSWORD }} profile: charleroi tags: | "imiobe/iadelib:charleroi-${{ github.ref_name }}" @@ -45,6 +60,11 @@ jobs: - name: Build and publish hainaut-prov image to harbor uses: IMIO/buildout.pm/actions/harbor@master with: + DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} + DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} + HARBOR_URL: ${{ secrets.HARBOR_URL }} + DELIB_HARBOR_USERNAME: ${{ secrets.DELIB_HARBOR_USERNAME }} + DELIB_HARBOR_PASSWORD: ${{ secrets.DELIB_HARBOR_PASSWORD }} profile: hainaut-prov tags: | "imiobe/iadelib:hainaut-prov-${{ github.ref_name }}" @@ -56,6 +76,11 @@ jobs: - name: Build and publish lalouviere image to harbor uses: IMIO/buildout.pm/actions/harbor@master with: + DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} + DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} + HARBOR_URL: ${{ secrets.HARBOR_URL }} + DELIB_HARBOR_USERNAME: ${{ secrets.DELIB_HARBOR_USERNAME }} + DELIB_HARBOR_PASSWORD: ${{ secrets.DELIB_HARBOR_PASSWORD }} profile: lalouviere tags: | "imiobe/iadelib:lalouviere-${{ github.ref_name }}" @@ -67,6 +92,11 @@ jobs: - name: Build and publish lalouviere-cpas image to harbor uses: IMIO/buildout.pm/actions/harbor@master with: + DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} + DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} + HARBOR_URL: ${{ secrets.HARBOR_URL }} + DELIB_HARBOR_USERNAME: ${{ secrets.DELIB_HARBOR_USERNAME }} + DELIB_HARBOR_PASSWORD: ${{ secrets.DELIB_HARBOR_PASSWORD }} profile: lalouviere-cpas tags: | "imiobe/iadelib:lalouviere-cpas-${{ github.ref_name }}" @@ -78,6 +108,11 @@ jobs: - name: Build and publish liege image to harbor uses: IMIO/buildout.pm/actions/harbor@master with: + DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} + DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} + HARBOR_URL: ${{ secrets.HARBOR_URL }} + DELIB_HARBOR_USERNAME: ${{ secrets.DELIB_HARBOR_USERNAME }} + DELIB_HARBOR_PASSWORD: ${{ secrets.DELIB_HARBOR_PASSWORD }} profile: liege tags: | "imiobe/iadelib:liege-${{ github.ref_name }}" @@ -89,6 +124,11 @@ jobs: - name: Build and publish mons image to harbor uses: IMIO/buildout.pm/actions/harbor@master with: + DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} + DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} + HARBOR_URL: ${{ secrets.HARBOR_URL }} + DELIB_HARBOR_USERNAME: ${{ secrets.DELIB_HARBOR_USERNAME }} + DELIB_HARBOR_PASSWORD: ${{ secrets.DELIB_HARBOR_PASSWORD }} profile: mons tags: | "imiobe/iadelib:mons-${{ github.ref_name }}" @@ -100,6 +140,11 @@ jobs: - name: Build and publish namur image to harbor uses: IMIO/buildout.pm/actions/harbor@master with: + DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} + DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} + HARBOR_URL: ${{ secrets.HARBOR_URL }} + DELIB_HARBOR_USERNAME: ${{ secrets.DELIB_HARBOR_USERNAME }} + DELIB_HARBOR_PASSWORD: ${{ secrets.DELIB_HARBOR_PASSWORD }} profile: namur tags: | "imiobe/iadelib:namur-${{ github.ref_name }}" @@ -111,6 +156,11 @@ jobs: - name: Build and publish seraing image to harbor uses: IMIO/buildout.pm/actions/harbor@master with: + DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} + DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} + HARBOR_URL: ${{ secrets.HARBOR_URL }} + DELIB_HARBOR_USERNAME: ${{ secrets.DELIB_HARBOR_USERNAME }} + DELIB_HARBOR_PASSWORD: ${{ secrets.DELIB_HARBOR_PASSWORD }} profile: seraing tags: | "imiobe/iadelib:seraing-${{ github.ref_name }}" diff --git a/actions/harbor/action.yml b/actions/harbor/action.yml index fdb51a7..b0f3ce2 100644 --- a/actions/harbor/action.yml +++ b/actions/harbor/action.yml @@ -1,6 +1,21 @@ name: 'Build and publish to harbor' description: 'Build and publish to dockerhub and IMIO container registry' inputs: + DOCKERHUB_USERNAME: + description: 'DOCKERHUB_USERNAME' + required: true + DOCKERHUB_PASSWORD: + description: 'DOCKERHUB_PASSWORD' + required: true + HARBOR_URL: + description: 'HARBOR_URL' + required: true + DELIB_HARBOR_USERNAME: + description: 'DELIB_HARBOR_USERNAME' + required: true + DELIB_HARBOR_PASSWORD: + description: 'DELIB_HARBOR_PASSWORD' + required: true profile: description: 'Buildout profile' required: true @@ -24,14 +39,14 @@ runs: - name: Login to DockerHub uses: docker/login-action@v3 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_PASSWORD }} + username: ${{ inputs.DOCKERHUB_USERNAME }} + password: ${{ inputs.DOCKERHUB_PASSWORD }} - name: Login to Harbor uses: docker/login-action@v3 with: - registry: ${{ secrets.HARBOR_URL }} - username: ${{ secrets.DELIB_HARBOR_USERNAME }} - password: ${{ secrets.DELIB_HARBOR_PASSWORD }} + registry: ${{ inputs.HARBOR_URL }} + username: ${{ inputs.DELIB_HARBOR_USERNAME }} + password: ${{ inputs.DELIB_HARBOR_PASSWORD }} - name: Build and push uses: docker/build-push-action@v5 with: