|
| 1 | +name: Docker MultiModule PR |
| 2 | + |
| 3 | +env: |
| 4 | + ENTANDO_GITHUB_TOOLS_VERSION: "v0.1.2" |
| 5 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 6 | + GH_PR_TITLE: ${{ github.event.pull_request.title }} |
| 7 | + GH_PR_NUMBER: ${{ github.event.pull_request.number }} |
| 8 | + GH_PR_RUN_NUMBER: ${{ github.run_number }} |
| 9 | + IMAGES_TO_BUILD: "Dockerfile.rocky9:entando-postgres-rocky,Dockerfile.ubi9:entando-postgres-ubi" |
| 10 | + ENTANDO_CRANE_VERSION: ${{ vars.ENTANDO_CRANE_VERSION || 'v0.10.0' }} |
| 11 | + GITHUB_REF: ${{ github.ref }} |
| 12 | + |
| 13 | +on: |
| 14 | + push: |
| 15 | + branches: [ "develop", "release/*" ] |
| 16 | + tags: [ 'v*' ] |
| 17 | + pull_request: |
| 18 | + branches: [ "develop", "release/*" ] |
| 19 | + |
| 20 | +jobs: |
| 21 | + publish: |
| 22 | + permissions: |
| 23 | + contents: read |
| 24 | + pull-requests: write |
| 25 | + |
| 26 | + runs-on: ubuntu-latest |
| 27 | + |
| 28 | + steps: |
| 29 | + - uses: actions/checkout@v4 |
| 30 | + |
| 31 | + - name: Configure |
| 32 | + run: if [ -f ".github/configure" ]; then . .github/configure "publish"; fi |
| 33 | + |
| 34 | + - name: Build Docker image |
| 35 | + run: | |
| 36 | + .github/github-tools/docker.multiBuild \ |
| 37 | + "${IMAGES_TO_BUILD}" \ |
| 38 | + "${ARTIFACT_VERSION}" \ |
| 39 | + "${{ vars.DOCKER_ORG }}" \ |
| 40 | + ; |
| 41 | +
|
| 42 | + - name: Publish Docker image |
| 43 | + run: | |
| 44 | + GH_DO_COMMENT=true \ |
| 45 | + .github/github-tools/docker.multiPublish \ |
| 46 | + "${IMAGES_TO_BUILD}" \ |
| 47 | + "${ARTIFACT_VERSION}" \ |
| 48 | + "${{ vars.DOCKER_ORG }}" \ |
| 49 | + "${{ vars.DOCKER_REGISTRY }}" \ |
| 50 | + "${{ secrets.DOCKER_USERNAME }}" \ |
| 51 | + "${{ secrets.DOCKER_PASSWORD }}" \ |
| 52 | + "${ARTIFACT_PUB_TYPE}" \ |
| 53 | + ; |
0 commit comments