<commit_before>---
name: Publish
on:
  workflow_dispatch:
  push:
    tags:
      - "v*"
env:
  ALIAS: aquasecurity
  DOCKERHUB_ALIAS: aquasec
  REP: kube-bench
jobs:
  publish:
    name: Publish
    runs-on: ubuntu-18.04
    steps:
      - name: Check Out Repo
        uses: actions/checkout@v3
      - name: Set up QEMU
        uses: docker/setup-qemu-action@v2
      - name: Set up Docker Buildx
        id: buildx
        uses: docker/setup-buildx-action@v2
      - name: Cache Docker layers
        uses: actions/cache@v3
        with:
          path: /tmp/.buildx-cache
          key: ${{ runner.os }}-buildxarch-${{ github.sha }}
          restore-keys: |
            ${{ runner.os }}-buildxarch-
      - name: Login to Docker Hub
        uses: docker/login-action@v2
        with:
          username: ${{ secrets.DOCKERHUB_USER }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
      - name: Login to ECR
        uses: docker/login-action@v2
        with:
          registry: public.ecr.aws
          username: ${{ secrets.ECR_ACCESS_KEY_ID }}
          password: ${{ secrets.ECR_SECRET_ACCESS_KEY }}
      - name: Get version
        id: get_version
        uses: crazy-max/ghaction-docker-meta@v3
        with:
          images: ${{ env.REP }}
          tag-semver: |
            {{version}}

      - name: Build and push - Docker/ECR
        id: docker_build
        uses: docker/build-push-action@v2
        with:
          context: .
          platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x
          builder: ${{ steps.buildx.outputs.name }}
          push: true
          build-args: |
            KUBEBENCH_VERSION=${{ steps.get_version.outputs.version }}
          tags: |
            ${{ env.DOCKERHUB_ALIAS }}/${{ env.REP }}:${{ steps.get_version.outputs.version }}
            public.ecr.aws/${{ env.ALIAS }}/${{ env.REP }}:${{ steps.get_version.outputs.version }}
            ${{ env.DOCKERHUB_ALIAS }}/${{ env.REP }}:latest
            public.ecr.aws/${{ env.ALIAS }}/${{ env.REP }}:latest
          cache-from: type=local,src=/tmp/.buildx-cache/release
          cache-to: type=local,mode=max,dest=/tmp/.buildx-cache/release
      - name: Image digest
        run: echo ${{ steps.docker_build.outputs.digest }}<commit_msg>Bump docker/build-push-action from 2 to 3 (#1175)<commit_after>---
name: Publish
on:
  workflow_dispatch:
  push:
    tags:
      - "v*"
env:
  ALIAS: aquasecurity
  DOCKERHUB_ALIAS: aquasec
  REP: kube-bench
jobs:
  publish:
    name: Publish
    runs-on: ubuntu-18.04
    steps:
      - name: Check Out Repo
        uses: actions/checkout@v3
      - name: Set up QEMU
        uses: docker/setup-qemu-action@v2
      - name: Set up Docker Buildx
        id: buildx
        uses: docker/setup-buildx-action@v2
      - name: Cache Docker layers
        uses: actions/cache@v3
        with:
          path: /tmp/.buildx-cache
          key: ${{ runner.os }}-buildxarch-${{ github.sha }}
          restore-keys: |
            ${{ runner.os }}-buildxarch-
      - name: Login to Docker Hub
        uses: docker/login-action@v2
        with:
          username: ${{ secrets.DOCKERHUB_USER }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
      - name: Login to ECR
        uses: docker/login-action@v2
        with:
          registry: public.ecr.aws
          username: ${{ secrets.ECR_ACCESS_KEY_ID }}
          password: ${{ secrets.ECR_SECRET_ACCESS_KEY }}
      - name: Get version
        id: get_version
        uses: crazy-max/ghaction-docker-meta@v3
        with:
          images: ${{ env.REP }}
          tag-semver: |
            {{version}}

      - name: Build and push - Docker/ECR
        id: docker_build
        uses: docker/build-push-action@v3
        with:
          context: .
          platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x
          builder: ${{ steps.buildx.outputs.name }}
          push: true
          build-args: |
            KUBEBENCH_VERSION=${{ steps.get_version.outputs.version }}
          tags: |
            ${{ env.DOCKERHUB_ALIAS }}/${{ env.REP }}:${{ steps.get_version.outputs.version }}
            public.ecr.aws/${{ env.ALIAS }}/${{ env.REP }}:${{ steps.get_version.outputs.version }}
            ${{ env.DOCKERHUB_ALIAS }}/${{ env.REP }}:latest
            public.ecr.aws/${{ env.ALIAS }}/${{ env.REP }}:latest
          cache-from: type=local,src=/tmp/.buildx-cache/release
          cache-to: type=local,mode=max,dest=/tmp/.buildx-cache/release
      - name: Image digest
        run: echo ${{ steps.docker_build.outputs.digest }}
{'fraction_non_alphanumeric': 0.13722051731696625, 'fraction_numerical': 0.01052170100832968, 'mean_word_length': 1.8989834815756035, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1437053', 'n_tokens_mistral': 1585, 'n_tokens_neox': 1505, 'n_words': 288}