Use docker/build-push-action@v2 (#211)
* Use docker/build-push-action@v2 * Enable qemu + buildx * Install cmake to enable compilation on other architectures
This commit is contained in:
parent
e08a87ee89
commit
6601ae9759
2 changed files with 30 additions and 8 deletions
35
.github/workflows/ci.yml
vendored
35
.github/workflows/ci.yml
vendored
|
|
@ -7,6 +7,7 @@ on:
|
|||
- 'master'
|
||||
- 'dev'
|
||||
- 'stable'
|
||||
- 'container-*'
|
||||
schedule:
|
||||
- cron: '0 18 * * 1,3,5' # Three-weekly at 18:00 UTC on Monday, Wednesday, and Friday
|
||||
pull_request:
|
||||
|
|
@ -874,17 +875,37 @@ jobs:
|
|||
|
||||
publish-docker-image:
|
||||
name: Publish Docker image on Docker Hub
|
||||
needs: [build-and-test]
|
||||
# needs: [build-and-test]
|
||||
runs-on: ubuntu-20.04
|
||||
if: github.event_name == 'push'
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Publish to Registry
|
||||
uses: docker/build-push-action@v1
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
repository: ${{ secrets.DOCKER_USERNAME }}/rizin
|
||||
tag_with_ref: true
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: Docker meta
|
||||
id: docker_meta
|
||||
uses: crazy-max/ghaction-docker-meta@v1
|
||||
with:
|
||||
images: ${{ secrets.DOCKERHUB_USERNAME }}/rizin
|
||||
tag-semver: |
|
||||
{{version}}
|
||||
{{major}}.{{minor}}
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
- name: Publish to Registry
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
platforms: linux/amd64,linux/arm64,linux/386
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.docker_meta.outputs.tags }}
|
||||
labels: ${{ steps.docker_meta.outputs.labels }}
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ VOLUME ["/mnt"]
|
|||
# pip3 install meson ninja
|
||||
RUN apt-get update && \
|
||||
apt-get install -y \
|
||||
cmake \
|
||||
gcc \
|
||||
git \
|
||||
python3-pip \
|
||||
|
|
@ -81,7 +82,7 @@ RUN apt-get update && \
|
|||
meson install -C build && \
|
||||
pip3 uninstall -y meson ninja && \
|
||||
apt-get remove --purge -y \
|
||||
python3-pip gcc &&\
|
||||
python3-pip gcc cmake &&\
|
||||
apt-get autoremove --purge -y && \
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue