diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index a9666bd..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,77 +0,0 @@ -version: 2.1 -orbs: - ms-teams: cloudradar-monitoring/ms-teams@0.0.1 -jobs: - - build_docker: - working_directory: ~/docker - machine: - image: ubuntu-2004:202111-02 - resource_class: large - environment: - DOCKER_BUILDKIT: 1 - BUILDX_PLATFORMS: linux/amd64 - steps: - - run: sudo apt-get update -qq && sudo apt install curl - - checkout - - run: - name: Install buildx - command: | - BUILDX_BINARY_URL="https://github.com/docker/buildx/releases/download/v0.8.2/buildx-v0.8.2.linux-amd64" - curl --output docker-buildx \ - --silent --show-error --location --fail --retry 3 \ - "$BUILDX_BINARY_URL" - mkdir -p ~/.docker/cli-plugins - mv docker-buildx ~/.docker/cli-plugins/ - chmod a+x ~/.docker/cli-plugins/docker-buildx - docker buildx install - # Run binfmt - docker run --rm --privileged tonistiigi/binfmt:latest --install "$BUILDX_PLATFORMS" - docker buildx create --name mybuilder --use - - run: - name: Login - command: echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin - - run: - name: Build Docker image filigran/python-nodejs-fips - command: docker buildx build --pull --platform $BUILDX_PLATFORMS -f Dockerfile_python_nodejs -t filigran/python-nodejs-fips:python3.12-nodejs22 -t filigran/python-nodejs-fips:latest --push . - no_output_timeout: 30m - - run: - name: Build Docker image filigran/python-fips - command: docker buildx build --pull --platform $BUILDX_PLATFORMS -f Dockerfile_python -t filigran/python-fips:python3.12 -t filigran/python-fips:latest --push . - no_output_timeout: 30m - - ms-teams/report: - only_on_fail: false - webhook_url: $MS_TEAMS_WORKFLOW_WEBHOOK_URL - - - notify: - docker: - - image: "cimg/base:stable" - steps: - - run: sudo apt-get update -qq && sudo apt install curl - - ms-teams/report: - only_on_fail: false - webhook_url: $MS_TEAMS_WORKFLOW_WEBHOOK_URL - -workflows: - docker_on_push: - jobs: - - build_docker: - filters: - branches: - only: - - main - docker_scheduled: - triggers: - - schedule: - cron: "0 0 * * *" - filters: - branches: - only: - - main - jobs: - - build_docker: - filters: - branches: - only: - - main diff --git a/.github/workflows/docker-build-push.yml b/.github/workflows/docker-build-push.yml new file mode 100644 index 0000000..dbc5032 --- /dev/null +++ b/.github/workflows/docker-build-push.yml @@ -0,0 +1,60 @@ +name: Build and publish Docker images + +on: + push: + branches: + - main + schedule: + # Daily rebuild, to pick up upstream Alpine security updates. + - cron: "0 0 * * *" + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: docker-build-push-${{ github.ref }} + cancel-in-progress: false + +jobs: + build: + name: Build ${{ matrix.image }} + runs-on: ubuntu-latest + timeout-minutes: 120 + strategy: + fail-fast: false + matrix: + include: + - image: filigran/python-fips + dockerfile: Dockerfile_python + tags: | + filigran/python-fips:python3.12 + filigran/python-fips:latest + - image: filigran/python-nodejs-fips + dockerfile: Dockerfile_python_nodejs + tags: | + filigran/python-nodejs-fips:python3.12-nodejs22 + filigran/python-nodejs-fips:latest + steps: + - name: Checkout repository + uses: actions/checkout@v7 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v4 + + - name: Log in to Docker Hub + uses: docker/login-action@v4 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push ${{ matrix.image }} + uses: docker/build-push-action@v7 + with: + context: . + file: ${{ matrix.dockerfile }} + platforms: linux/amd64 + pull: true + push: true + no-cache: true + tags: ${{ matrix.tags }} diff --git a/README.md b/README.md index a8f305d..4578110 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Pulls](https://img.shields.io/docker/pulls/filigran/python-nodejs-fips.svg)](https://hub.docker.com/r/filigran/python-nodejs-fips/) [![Pulls](https://img.shields.io/docker/pulls/filigran/python-fips.svg)](https://hub.docker.com/r/filigran/python-fips/) -[![CircleCI](https://img.shields.io/circleci/project/github/FiligranHQ/docker-python-nodejs-fips.svg)](https://circleci.com/gh/FiligranHQ/docker-python-nodejs-fips) +[![Build](https://github.com/FiligranHQ/docker-python-nodejs-fips/actions/workflows/docker-build-push.yml/badge.svg)](https://github.com/FiligranHQ/docker-python-nodejs-fips/actions/workflows/docker-build-push.yml) ## Docker Python NodeJS FIPS