move aarch64 build to CI
This commit is contained in:
parent
2ff713ba3a
commit
d0bb6d7e2f
|
@ -78,3 +78,20 @@ jobs:
|
|||
docker tag discourse/discourse_dev:build discourse/discourse_dev:release
|
||||
docker login --username discoursebuild --password $DOCKERHUB_PASSWORD
|
||||
docker push discourse/discourse_dev:release
|
||||
aarch64:
|
||||
runs-on: [ubuntu-20.04]
|
||||
needs: base
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 1
|
||||
- name: build base image for aarch64
|
||||
run: |
|
||||
cd image/base && docker buildx build . --platform linux/arm64 --load --tag discourse/base:aarch64
|
||||
- name: push to dockerhub
|
||||
if: success() && (github.ref == 'refs/heads/main')
|
||||
env:
|
||||
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
run: |
|
||||
docker login --username discoursebuild --password $DOCKERHUB_PASSWORD
|
||||
docker push discourse/base:aarch64
|
||||
|
|
|
@ -30,7 +30,7 @@ def run(command)
|
|||
end
|
||||
|
||||
def build(image)
|
||||
lines = run("cd #{image[:name]} && docker buildx build . --platform linux/arm64 --load --tag #{image[:tag]} #{image[:extra_args] ? image[:extra_args] : ''}")
|
||||
lines = run("cd #{image[:name]} && docker build . --no-cache --tag #{image[:tag]} #{image[:squash] ? '--squash' : ''} #{image[:extra_args] ? image[:extra_args] : ''}")
|
||||
raise "Error building the image for #{image[:name]}: #{lines[-1]}" if lines[-1] =~ /successfully built/
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue