7171 docker : ${{ steps.docker-changes.outputs.docker }}
7272 workflow : ${{ steps.docker-changes.outputs.workflow }}
7373
74- test-docker-build :
74+ test-docker-build-arm64 :
7575 needs : [should-test-docker-build]
76- name : Test Docker build
76+ name : Test Docker build ARM64
7777 runs-on : ubuntu-latest
7878 if : (needs.should-test-docker-build.outputs.workflow == 'true' || needs.should-test-docker-build.outputs.docker == 'true') && !startsWith(github.event.head_commit.message, 'bump:')
7979 permissions :
9696 context : .
9797 file : ./Dockerfile
9898 push : false
99- platforms : linux/amd64,linux/arm64
99+ load : true
100+ platforms : linux/arm64
100101 cache-from : type=registry,ref=ghcr.io/elementsinteractive/twyn:buildcache
101-
102+ image-name : build-arm64
103+
104+ - name : Test
105+ run : |
106+ docker run --rm build-arm64:${{ github.event.pull_request.number }} --version
107+
108+ test-docker-build-amd64 :
109+ needs : [should-test-docker-build]
110+ name : Test Docker build AMD64
111+ runs-on : ubuntu-latest
112+ if : (needs.should-test-docker-build.outputs.workflow == 'true' || needs.should-test-docker-build.outputs.docker == 'true') && !startsWith(github.event.head_commit.message, 'bump:')
113+ permissions :
114+ contents : read
115+ packages : read
116+ steps :
117+ - name : Check out the repo
118+ uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
119+
120+ - name : Log in to GitHub Container Registry
121+ uses : docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
122+ with :
123+ registry : ghcr.io
124+ username : ${{ github.actor }}
125+ password : ${{ secrets.GITHUB_TOKEN }}
126+
127+ - name : Build image
128+ uses : ./.github/actions/docker-build
129+ with :
130+ context : .
131+ file : ./Dockerfile
132+ push : false
133+ load : true
134+ platforms : linux/amd64
135+ cache-from : type=registry,ref=ghcr.io/elementsinteractive/twyn:buildcache
136+ image-name : build-amd64
137+
138+ - name : Test
139+ run : |
140+ docker images
141+ docker run --rm build-amd64:pr-${{ github.event.pull_request.number }} --version
0 commit comments