From 12a942d49a89b7e5acc144cd6d85908feaac1732 Mon Sep 17 00:00:00 2001 From: Adam Janovsky Date: Mon, 27 Nov 2023 08:20:33 +0100 Subject: add action to try multiarch build --- .github/workflows/try_multiarch_build.yml | 35 +++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/try_multiarch_build.yml diff --git a/.github/workflows/try_multiarch_build.yml b/.github/workflows/try_multiarch_build.yml new file mode 100644 index 00000000..ae827ee0 --- /dev/null +++ b/.github/workflows/try_multiarch_build.yml @@ -0,0 +1,35 @@ +name: Try multiarch docker build +on: + workflow_dispatch: + +jobs: + docker_release: + name: Release on DockerHub + runs-on: ubuntu-latest + if: github.repository == 'crocs-muni/sec-certs' + steps: + - name: Check out the repo + uses: actions/checkout@v3 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v5 + with: + images: seccerts/sec-certs + - name: Build and push + id: docker_build + uses: docker/build-push-action@v5 + with: + context: . + platforms: linux/amd64,linux/arm64 + file: Dockerfile + push: true + tags: ${{ steps.meta.outputs.tags }} -- cgit v1.3.1 From 41f759e98b08b8da6fd914c04037425c99ff6e4a Mon Sep 17 00:00:00 2001 From: Adam Janovsky Date: Mon, 27 Nov 2023 08:22:40 +0100 Subject: build multiarch image on push --- .github/workflows/try_multiarch_build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/try_multiarch_build.yml b/.github/workflows/try_multiarch_build.yml index ae827ee0..2bb1a4e3 100644 --- a/.github/workflows/try_multiarch_build.yml +++ b/.github/workflows/try_multiarch_build.yml @@ -1,5 +1,6 @@ name: Try multiarch docker build on: + push: workflow_dispatch: jobs: -- cgit v1.3.1 From 64e98e59b6f9277ec20a9b3370a6fd3f18733dfd Mon Sep 17 00:00:00 2001 From: Adam Janovsky Date: Mon, 27 Nov 2023 09:36:33 +0100 Subject: change installed reqs in dockerfile to shrink docker image size --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index acd47372..fdac3c05 100644 --- a/Dockerfile +++ b/Dockerfile @@ -56,7 +56,7 @@ ENV PATH="${VENV_PATH}/bin:$PATH" # Install dependencies, notebook is because of mybinder.org RUN \ pip3 install -U pip wheel pip-tools && \ - pip-sync requirements/all_requirements.txt && \ + pip-sync requirements/requirements.txt && \ pip3 install --no-cache notebook jupyterlab && \ pip3 install -e . && \ python3 -m spacy download en_core_web_sm -- cgit v1.3.1 From 8e8c74c76f9f2ede6c130cb74d449a3452357f11 Mon Sep 17 00:00:00 2001 From: Adam Janovsky Date: Mon, 27 Nov 2023 09:54:19 +0100 Subject: replace testing workflow with actual release workflow --- .github/workflows/release.yml | 11 +++++++--- .github/workflows/try_multiarch_build.yml | 36 ------------------------------- 2 files changed, 8 insertions(+), 39 deletions(-) delete mode 100644 .github/workflows/try_multiarch_build.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1ab6081f..e57e88d3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,21 +37,26 @@ jobs: steps: - name: Check out the repo uses: actions/checkout@v3 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 - name: Login to DockerHub - uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_PASSWORD }} - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 + uses: docker/metadata-action@v5 with: images: seccerts/sec-certs - name: Build and push id: docker_build - uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 + uses: docker/build-push-action@v5 with: context: . + platforms: linux/amd64,linux/arm64 file: Dockerfile push: true tags: ${{ steps.meta.outputs.tags }} diff --git a/.github/workflows/try_multiarch_build.yml b/.github/workflows/try_multiarch_build.yml deleted file mode 100644 index 2bb1a4e3..00000000 --- a/.github/workflows/try_multiarch_build.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Try multiarch docker build -on: - push: - workflow_dispatch: - -jobs: - docker_release: - name: Release on DockerHub - runs-on: ubuntu-latest - if: github.repository == 'crocs-muni/sec-certs' - steps: - - name: Check out the repo - uses: actions/checkout@v3 - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Login to DockerHub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_PASSWORD }} - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@v5 - with: - images: seccerts/sec-certs - - name: Build and push - id: docker_build - uses: docker/build-push-action@v5 - with: - context: . - platforms: linux/amd64,linux/arm64 - file: Dockerfile - push: true - tags: ${{ steps.meta.outputs.tags }} -- cgit v1.3.1