|
| 1 | +name: publish-13 |
| 2 | + |
| 3 | +on: |
| 4 | + release: |
| 5 | + types: [published] |
| 6 | + workflow_dispatch: |
| 7 | + |
| 8 | +jobs: |
| 9 | + publish-13: |
| 10 | + runs-on: ubuntu-latest |
| 11 | + steps: |
| 12 | + - |
| 13 | + name: Checkout code |
| 14 | + uses: actions/checkout@v2 |
| 15 | + - |
| 16 | + name: Read PostgreSQL version - minor |
| 17 | + uses: bfren/read-file@v1 |
| 18 | + with: |
| 19 | + file: ./13/POSTGRESQL_MINOR |
| 20 | + id: postgresql_minor |
| 21 | + - |
| 22 | + name: Read PostgreSQL version - build |
| 23 | + uses: bfren/read-file@v1 |
| 24 | + with: |
| 25 | + file: ./13/POSTGRESQL_BUILD |
| 26 | + id: postgresql_build |
| 27 | + - |
| 28 | + name: Read image version |
| 29 | + uses: bfren/read-file@v1 |
| 30 | + with: |
| 31 | + file: ./VERSION |
| 32 | + id: version |
| 33 | + - |
| 34 | + name: Set up QEMU |
| 35 | + uses: docker/setup-qemu-action@v1 |
| 36 | + - |
| 37 | + name: Set up Docker Buildx |
| 38 | + uses: docker/setup-buildx-action@v1 |
| 39 | + - |
| 40 | + name: Login to DockerHub |
| 41 | + uses: docker/login-action@v1 |
| 42 | + with: |
| 43 | + username: ${{ secrets.DOCKERHUB_USERNAME }} |
| 44 | + password: ${{ secrets.DOCKERHUB_TOKEN }} |
| 45 | + - |
| 46 | + name: Build and push |
| 47 | + id: docker_build |
| 48 | + uses: docker/build-push-action@v2 |
| 49 | + with: |
| 50 | + context: . |
| 51 | + file: ./13/Dockerfile |
| 52 | + push: true |
| 53 | + platforms: linux/amd64,linux/arm/v7,linux/arm64 |
| 54 | + tags: | |
| 55 | + bfren/postgresql:latest |
| 56 | + bfren/postgresql:${{ steps.version.outputs.contents }} |
| 57 | + bfren/postgresql:postgresql13 |
| 58 | + bfren/postgresql:postgresql13-${{ steps.version.outputs.contents }} |
| 59 | + bfren/postgresql:postgresql${{ steps.postgresql_minor.outputs.contents }} |
| 60 | + bfren/postgresql:postgresql${{ steps.postgresql_minor.outputs.contents }}-${{ steps.version.outputs.contents }} |
| 61 | + bfren/postgresql:postgresql${{ steps.postgresql_build.outputs.contents }} |
| 62 | + - |
| 63 | + name: Image digest |
| 64 | + run: echo ${{ steps.docker_build.outputs.digest }} |
0 commit comments