diff --git a/.github/linters/.cspell.json b/.github/linters/.cspell.json index 7972dd2b5a3..178b250b527 100644 --- a/.github/linters/.cspell.json +++ b/.github/linters/.cspell.json @@ -1080,6 +1080,7 @@ "regexpp", "rego", "regsub", + "reimann", "reindent", "relaxng", "remarkrc", @@ -1360,4 +1361,4 @@ "\u0636clojure", "\u077bcbad" ] -} \ No newline at end of file +} diff --git a/.github/workflows/deploy-ALPHA-flavors.yml b/.github/workflows/deploy-ALPHA-flavors.yml index 9f213a2f94e..d1a7598d96e 100644 --- a/.github/workflows/deploy-ALPHA-flavors.yml +++ b/.github/workflows/deploy-ALPHA-flavors.yml @@ -78,9 +78,9 @@ jobs: - name: Checkout Code uses: actions/checkout@v3 - ##################### - # Run Deploy script # - ##################### + ################################### + # Run Deploy script for Dockerhub # + ################################### - name: Deploy latest image to DockerHub env: # Set the Env Vars @@ -95,6 +95,23 @@ jobs: shell: bash run: .automation/upload-docker.sh + ################################################### + # Run Deploy script for GitHub Container Registry # + ################################################### + - name: Deploy latest image to GitHub Container Registry + env: + # Set the Env Vars + GCR_USERNAME: ${{ secrets.GCR_USERNAME }} + GCR_TOKEN: ${{ secrets.GCR_PASSWORD }} + IMAGE_REPO: oxsecurity/megalinter-${{ matrix.flavor }} + IMAGE_VERSION: alpha + DOCKERFILE_PATH: flavors/${{ matrix.flavor }}/Dockerfile + DOCKER_BUILD_PLATFORMS: linux/amd64 + REGISTRY: GCR + SQUASH: "true" + shell: bash + run: .automation/upload-docker.sh + # Free disk space - name: Free Disk space shell: bash diff --git a/.github/workflows/deploy-BETA-flavors.yml b/.github/workflows/deploy-BETA-flavors.yml index 76869617eed..f39ab7c3984 100644 --- a/.github/workflows/deploy-BETA-flavors.yml +++ b/.github/workflows/deploy-BETA-flavors.yml @@ -82,9 +82,9 @@ jobs: - name: Checkout Code uses: actions/checkout@v3 - ##################### - # Run Deploy script # - ##################### + ################################### + # Run Deploy script for Dockerhub # + ################################### - name: Deploy beta image to DockerHub env: # Set the Env Vars @@ -98,6 +98,22 @@ jobs: shell: bash run: .automation/upload-docker.sh + ################################################### + # Run Deploy script for GitHub Container Registry # + ################################################### + - name: Deploy beta image to GitHub Container Registry + env: + # Set the Env Vars + GCR_USERNAME: ${{ secrets.GCR_USERNAME }} + GCR_TOKEN: ${{ secrets.GCR_PASSWORD }} + IMAGE_REPO: oxsecurity/megalinter-${{ matrix.flavor }} + IMAGE_VERSION: beta + DOCKERFILE_PATH: flavors/${{ matrix.flavor }}/Dockerfile + DOCKER_BUILD_PLATFORMS: linux/amd64 + REGISTRY: GCR + shell: bash + run: .automation/upload-docker.sh + # Free disk space - name: Free Disk space shell: bash diff --git a/.github/workflows/deploy-BETA-linters.yml b/.github/workflows/deploy-BETA-linters.yml index 53957856c4f..3fa5ed148ff 100644 --- a/.github/workflows/deploy-BETA-linters.yml +++ b/.github/workflows/deploy-BETA-linters.yml @@ -109,9 +109,9 @@ jobs: - name: Checkout Code uses: actions/checkout@v3 - ##################### - # Run Deploy script # - ##################### + ################################### + # Run Deploy script for Dockerhub # + ################################### - name: Deploy Beta image to DockerHub env: # Set the Env Vars @@ -139,6 +139,36 @@ jobs: shell: bash run: .automation/upload-docker.sh + ################################################### + # Run Deploy script for GitHub Container Registry # + ################################################### + - name: Deploy Beta image to GitHub Container Registry + env: + # Set the Env Vars + GCR_USERNAME: ${{ secrets.GCR_USERNAME }} + GCR_TOKEN: ${{ secrets.GCR_PASSWORD }} + IMAGE_REPO: oxsecurity/megalinter-only-${{ matrix.linter }} + IMAGE_VERSION: beta + DOCKERFILE_PATH: linters/${{ matrix.linter }}/Dockerfile + DOCKER_BUILD_PLATFORMS: linux/amd64 + REGISTRY: GCR + shell: bash + run: .automation/upload-docker.sh + + - name: Deploy ${{ needs.prepare.outputs.unique_docker_image_name }} image to GitHub Container Registry + env: + # Set the Env Vars + GCR_USERNAME: ${{ secrets.GCR_USERNAME }} + GCR_TOKEN: ${{ secrets.GCR_PASSWORD }} + IMAGE_REPO: oxsecurity/megalinter-only-${{ matrix.linter }} + IMAGE_VERSION: "${{ needs.prepare.outputs.unique_docker_image_name }}" + DOCKERFILE_PATH: linters/${{ matrix.linter }}/Dockerfile + DOCKER_BUILD_PLATFORMS: linux/amd64 + REGISTRY: GCR + ALWAYS_BUILD: force + shell: bash + run: .automation/upload-docker.sh + ##################################### # Run Linter test cases # ##################################### diff --git a/.github/workflows/deploy-RELEASE-flavors.yml b/.github/workflows/deploy-RELEASE-flavors.yml index ed8c0172528..2996671525f 100644 --- a/.github/workflows/deploy-RELEASE-flavors.yml +++ b/.github/workflows/deploy-RELEASE-flavors.yml @@ -87,6 +87,22 @@ jobs: shell: bash run: .automation/upload-docker.sh + ################################################### + # Run Deploy script for GitHub Container Registry # + ################################################### + - name: Deploy Release image to GitHub Container Registry + env: + # Set the Env Vars + GCR_USERNAME: ${{ secrets.GCR_USERNAME }} + GCR_TOKEN: ${{ secrets.GCR_PASSWORD }} + IMAGE_REPO: oxsecurity/megalinter-${{ matrix.flavor }} + IMAGE_VERSION: ${{ github.event.release.tag_name }} + DOCKERFILE_PATH: flavors/${{ matrix.flavor }}/Dockerfile + DOCKER_BUILD_PLATFORMS: linux/amd64 + REGISTRY: GCR + shell: bash + run: .automation/upload-docker.sh + # Free disk space - name: Free Disk space shell: bash @@ -108,4 +124,3 @@ jobs: vuln-type: 'os,library' severity: 'CRITICAL,HIGH' timeout: 10m0s - diff --git a/.github/workflows/deploy-RELEASE-linters.yml b/.github/workflows/deploy-RELEASE-linters.yml index 59320b3adca..473dbbf9d53 100644 --- a/.github/workflows/deploy-RELEASE-linters.yml +++ b/.github/workflows/deploy-RELEASE-linters.yml @@ -85,9 +85,9 @@ jobs: - name: Checkout Code uses: actions/checkout@v3 - ##################### - # Run Deploy script # - ##################### + ################################### + # Run Deploy script for Dockerhub # + ################################### - name: Deploy ${{ github.event.release.tag_name }} image to DockerHub env: # Set the Env Vars @@ -102,6 +102,23 @@ jobs: shell: bash run: .automation/upload-docker.sh + ################################################### + # Run Deploy script for GitHub Container Registry # + ################################################### + - name: Deploy ${{ github.event.release.tag_name }} image to GitHub Container Registry + env: + # Set the Env Vars + GCR_USERNAME: ${{ secrets.GCR_USERNAME }} + GCR_TOKEN: ${{ secrets.GCR_PASSWORD }} + IMAGE_REPO: oxsecurity/megalinter-only-${{ matrix.linter }} + IMAGE_VERSION: "${{ github.event.release.tag_name }}" + DOCKERFILE_PATH: linters/${{ matrix.linter }}/Dockerfile + DOCKER_BUILD_PLATFORMS: linux/amd64 + REGISTRY: GCR + ALWAYS_BUILD: force + shell: bash + run: .automation/upload-docker.sh + ##################################### # Run Linter test cases # ##################################### diff --git a/CHANGELOG.md b/CHANGELOG.md index 5cf745a0f0a..b75d83ac54d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), Note: Can be used with `oxsecurity/megalinter@beta` in your GitHub Action mega-linter.yml file, or with `oxsecurity/megalinter:beta` docker image +- Core + - Deploy additional Docker images to GitHub Container Registry, by @lars-reimann in [#2117](https://github.com/oxsecurity/megalinter/pull/2117) + - Fixes - Change name of config file for powershell formatter to avoid collision with powershell linter config