@@ -32,98 +32,98 @@ concurrency:
3232 group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
3333 cancel-in-progress : true
3434jobs :
35- build-package-generic-unix :
36- strategy :
37- matrix :
38- otp_version :
39- - ${{ github.event.inputs.otp_version || '28' }}
40- runs-on : ubuntu-latest
41- outputs :
42- # When dependabot, or a user from a fork, creates PRs, secrets are not injected, and the OCI workflow can't push the image
43- # This check acts as a gate keeper
44- authorized : ${{ steps.authorized.outputs.authorized }}
45- steps :
46- - name : CHECK IF IMAGE WILL PUSH
47- id : authorized
48- run : |
49- if [ -n "${{ secrets.DOCKERHUB_PASSWORD }}" ]; then
50- echo "authorized=true" | tee -a $GITHUB_OUTPUT
51- else
52- echo "authorized=false" | tee -a $GITHUB_OUTPUT
53- fi
54- - name : Checkout
55- if : steps.authorized.outputs.authorized == 'true'
56- uses : actions/checkout@v4
57- - name : Configure Erlang
58- if : steps.authorized.outputs.authorized == 'true'
59- uses : erlef/setup-beam@v1
60- with :
61- otp-version : ${{ matrix.otp_version }}
62- elixir-version : latest
63- - name : make package-generic-unix
64- if : steps.authorized.outputs.authorized == 'true'
65- run : |
66- make package-generic-unix PROJECT_VERSION=${{ env.VERSION }}
67- - name : Upload package-generic-unix
68- if : steps.authorized.outputs.authorized == 'true'
69- uses : actions/upload-artifact@v4
70- with :
71- name : package-generic-unix-otp${{ matrix.otp_version }}
72- path : PACKAGES/rabbitmq-server-*.tar.xz
73-
74- build-and-push :
75- strategy :
76- fail-fast : false
77- matrix :
78- otp_version :
79- - ${{ github.event.inputs.otp_version || '28' }}
80- needs : build-package-generic-unix
81- runs-on : ubuntu-latest
82- if : ${{ needs.build-package-generic-unix.outputs.authorized }} == 'true'
83- steps :
84- - name : Checkout
85- uses : actions/checkout@v4
86- - name : Download package-generic-unix
87- uses : actions/download-artifact@v4
88- with :
89- name : package-generic-unix-otp${{ matrix.otp_version }}
90- path : PACKAGES
91- - name : Rename package-generic-unix
92- run : |
93- cp \
94- PACKAGES/rabbitmq-server-generic-unix-*.tar.xz \
95- packaging/docker-image/package-generic-unix.tar.xz
96- - name : Docker meta
97- id : meta
98- uses : docker/metadata-action@v5
99- with :
100- images : ${{ env.REGISTRY_IMAGE }}
101- flavor : |
102- suffix=-otp${{ matrix.otp_version }}
103- tags : |
104- type=ref,event=branch
105- type=ref,event=pr
106- type=sha,format=long
107- - name : Set up QEMU
108- uses : docker/setup-qemu-action@v3
109- - name : Set up Docker Buildx
110- uses : docker/setup-buildx-action@v3
111- - name : Login to Docker Hub
112- uses : docker/login-action@v3
113- with :
114- username : ${{ secrets.DOCKERHUB_USERNAME }}
115- password : ${{ secrets.DOCKERHUB_PASSWORD }}
116- - name : Build and push by digest
117- id : build
118- uses : docker/build-push-action@v6
119- with :
120- push : true
121- context : packaging/docker-image
122- labels : ${{ steps.meta.outputs.labels }}
123- platforms : ${{ github.event.inputs.build_arm && 'linux/amd64, linux/arm64' || 'linux/amd64' }}
124- tags : ${{ steps.meta.outputs.tags }}
125- cache-to : type=gha,mode=max,scope=${{ matrix.otp_version }}
126- cache-from : type=gha,scope=${{ matrix.otp_version }}
127- build-args : |
128- OTP_VERSION=${{ matrix.otp_version }}
129- RABBITMQ_VERSION=${{ env.VERSION }}
35+ # build-package-generic-unix:
36+ # strategy:
37+ # matrix:
38+ # otp_version:
39+ # - ${{ github.event.inputs.otp_version || '28' }}
40+ # runs-on: ubuntu-latest
41+ # outputs:
42+ # # When dependabot, or a user from a fork, creates PRs, secrets are not injected, and the OCI workflow can't push the image
43+ # # This check acts as a gate keeper
44+ # authorized: ${{ steps.authorized.outputs.authorized }}
45+ # steps:
46+ # - name: CHECK IF IMAGE WILL PUSH
47+ # id: authorized
48+ # run: |
49+ # if [ -n "${{ secrets.DOCKERHUB_PASSWORD }}" ]; then
50+ # echo "authorized=true" | tee -a $GITHUB_OUTPUT
51+ # else
52+ # echo "authorized=false" | tee -a $GITHUB_OUTPUT
53+ # fi
54+ # - name: Checkout
55+ # if: steps.authorized.outputs.authorized == 'true'
56+ # uses: actions/checkout@v4
57+ # - name: Configure Erlang
58+ # if: steps.authorized.outputs.authorized == 'true'
59+ # uses: erlef/setup-beam@v1
60+ # with:
61+ # otp-version: ${{ matrix.otp_version }}
62+ # elixir-version: latest
63+ # - name: make package-generic-unix
64+ # if: steps.authorized.outputs.authorized == 'true'
65+ # run: |
66+ # make package-generic-unix PROJECT_VERSION=${{ env.VERSION }}
67+ # - name: Upload package-generic-unix
68+ # if: steps.authorized.outputs.authorized == 'true'
69+ # uses: actions/upload-artifact@v4
70+ # with:
71+ # name: package-generic-unix-otp${{ matrix.otp_version }}
72+ # path: PACKAGES/rabbitmq-server-*.tar.xz
73+ #
74+ # build-and-push:
75+ # strategy:
76+ # fail-fast: false
77+ # matrix:
78+ # otp_version:
79+ # - ${{ github.event.inputs.otp_version || '28' }}
80+ # needs: build-package-generic-unix
81+ # runs-on: ubuntu-latest
82+ # if: ${{ needs.build-package-generic-unix.outputs.authorized }} == 'true'
83+ # steps:
84+ # - name: Checkout
85+ # uses: actions/checkout@v4
86+ # - name: Download package-generic-unix
87+ # uses: actions/download-artifact@v4
88+ # with:
89+ # name: package-generic-unix-otp${{ matrix.otp_version }}
90+ # path: PACKAGES
91+ # - name: Rename package-generic-unix
92+ # run: |
93+ # cp \
94+ # PACKAGES/rabbitmq-server-generic-unix-*.tar.xz \
95+ # packaging/docker-image/package-generic-unix.tar.xz
96+ # - name: Docker meta
97+ # id: meta
98+ # uses: docker/metadata-action@v5
99+ # with:
100+ # images: ${{ env.REGISTRY_IMAGE }}
101+ # flavor: |
102+ # suffix=-otp${{ matrix.otp_version }}
103+ # tags: |
104+ # type=ref,event=branch
105+ # type=ref,event=pr
106+ # type=sha,format=long
107+ # - name: Set up QEMU
108+ # uses: docker/setup-qemu-action@v3
109+ # - name: Set up Docker Buildx
110+ # uses: docker/setup-buildx-action@v3
111+ # - name: Login to Docker Hub
112+ # uses: docker/login-action@v3
113+ # with:
114+ # username: ${{ secrets.DOCKERHUB_USERNAME }}
115+ # password: ${{ secrets.DOCKERHUB_PASSWORD }}
116+ # - name: Build and push by digest
117+ # id: build
118+ # uses: docker/build-push-action@v6
119+ # with:
120+ # push: true
121+ # context: packaging/docker-image
122+ # labels: ${{ steps.meta.outputs.labels }}
123+ # platforms: ${{ github.event.inputs.build_arm && 'linux/amd64, linux/arm64' || 'linux/amd64' }}
124+ # tags: ${{ steps.meta.outputs.tags }}
125+ # cache-to: type=gha,mode=max,scope=${{ matrix.otp_version }}
126+ # cache-from: type=gha,scope=${{ matrix.otp_version }}
127+ # build-args: |
128+ # OTP_VERSION=${{ matrix.otp_version }}
129+ # RABBITMQ_VERSION=${{ env.VERSION }}
0 commit comments