-
-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into renovate/python-3.x
- Loading branch information
Showing
46 changed files
with
913 additions
and
674 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ on: | |
branches: | ||
- "main" | ||
- "FlavoredMegaLinters" | ||
- dbgbeta | ||
paths: | ||
- ".github/workflows/**" | ||
- "Dockerfile" | ||
|
@@ -94,39 +95,56 @@ jobs: | |
id: meta | ||
with: | ||
images: | | ||
${{ github.repository }}-${{ matrix.flavor }} | ||
ghcr.io/${{ github.repository }}-${{ matrix.flavor }} | ||
flavor: | | ||
latest=false | ||
prefix=beta | ||
tags: | | ||
type=raw,value= | ||
- name: Docker Metadata action (Docker Hub) | ||
uses: docker/[email protected] | ||
id: meta-dhub | ||
with: | ||
images: | | ||
${{ github.repository }}-${{ matrix.flavor }} | ||
flavor: | | ||
latest=false | ||
prefix=beta | ||
tags: | | ||
type=raw,value= | ||
- name: Docker Metadata action (Worker) | ||
uses: docker/[email protected] | ||
id: meta-w | ||
with: | ||
images: | | ||
name=${{ github.repository }}-worker-${{ matrix.flavor }},enable=false | ||
name=ghcr.io/${{ github.repository }}-worker-${{ matrix.flavor }} | ||
flavor: | | ||
latest=false | ||
prefix=beta | ||
tags: | | ||
type=raw,value= | ||
- name: Docker Metadata action (Worker Docker Hub) | ||
uses: docker/[email protected] | ||
id: meta-w-dhub | ||
with: | ||
images: | | ||
name=docker.io/${{ github.repository }}-worker-${{ matrix.flavor }} | ||
flavor: | | ||
latest=false | ||
prefix=beta | ||
tags: | | ||
type=raw,value= | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
if: ${{ ( ( runner.arch != 'X64' || runner.os != 'Linux' ) && matrix.platform == 'linux/amd64' ) || matrix.platform != 'linux/amd64' }} | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
|
@@ -172,15 +190,39 @@ jobs: | |
push: ${{ github.event_name != 'pull_request' }} | ||
secrets: | | ||
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
tags: ${{ steps.meta-w.outputs.tags }} | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
# Copy ghrc.io image to Docker Hub (main image) | ||
- name: Debug output | ||
run: "echo \"Tag steps.meta.outputs.tags: ${{ steps.meta.outputs.tags }}\"" | ||
- name: Pull image from GHCR | ||
run: docker system prune -a --force && docker pull "${{ steps.meta.outputs.tags }}" | ||
- name: Tag image for Docker Hub | ||
run: docker tag "${{ steps.meta.outputs.tags }}" "${{ steps.meta-dhub.outputs.tags }}" | ||
- name: Push image to Docker Hub | ||
run: docker push "${{ steps.meta-dhub.outputs.tags }}" | ||
|
||
# Copy ghrc.io image to Docker Hub (worker) | ||
- name: Pull image from GHCR | ||
run: docker system prune -a --force && docker pull "${{ steps.meta-w.outputs.tags }}" | ||
- name: Tag image for Docker Hub | ||
run: docker tag "${{ steps.meta-w.outputs.tags }}" "${{ steps.meta-w-dhub.outputs.tags }}" | ||
- name: Push image to Docker Hub | ||
run: docker push "${{ steps.meta-w-dhub.outputs.tags }}" | ||
|
||
############################################## | ||
# Check Docker image security with Trivy # | ||
############################################## | ||
- name: Run Trivy vulnerability scanner | ||
uses: aquasecurity/trivy-action@master | ||
with: | ||
image-ref: "docker.io/${{ fromJson(steps.meta.outputs.json).tags[0]}}" | ||
image-ref: "${{ fromJson(steps.meta.outputs.json).tags[0]}}" | ||
format: "table" | ||
exit-code: "1" | ||
ignore-unfixed: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ on: | |
push: | ||
branches: | ||
- "main" | ||
- "dbgbeta" | ||
paths: | ||
- ".github/workflows/**" | ||
- "Dockerfile" | ||
|
@@ -195,7 +196,6 @@ jobs: | |
id: meta | ||
with: | ||
images: | | ||
${{ github.repository }}-only-${{ matrix.linter }} | ||
ghcr.io/${{ github.repository }}-only-${{ matrix.linter }} | ||
flavor: | | ||
latest=false | ||
|
@@ -204,19 +204,26 @@ jobs: | |
type=raw,value= | ||
type=raw,value={{date 'YYYYMMDD_HHmm'}} | ||
- name: Docker Metadata action (Docker hub) | ||
uses: docker/[email protected] | ||
id: meta-dhub | ||
with: | ||
images: | | ||
docker.io/${{ github.repository }}-only-${{ matrix.linter }} | ||
flavor: | | ||
latest=false | ||
prefix=beta | ||
tags: | | ||
type=raw,value= | ||
type=raw,value={{date 'YYYYMMDD_HHmm'}} | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
if: ${{ ( ( runner.arch != 'X64' || runner.os != 'Linux' ) && matrix.platform == 'linux/amd64' ) || matrix.platform != 'linux/amd64' }} | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
|
@@ -255,13 +262,29 @@ jobs: | |
docker run -e TEST_CASE_RUN=true -e OUTPUT_FORMAT=text -e OUTPUT_FOLDER=${{ github.sha }} -e OUTPUT_DETAIL=detailed -e GITHUB_SHA=${{ github.sha }} -e GITHUB_REPOSITORY=${GITHUB_REPOSITORY} -e GITHUB_BRANCH=${GITHUB_BRANCH} -e GITHUB_TOKEN="${{ secrets.GITHUB_TOKEN }}" -e TEST_KEYWORDS="${TEST_KEYWORDS_TO_USE}" -e MEGALINTER_VOLUME_ROOT="${GITHUB_WORKSPACE}" -v "/var/run/docker.sock:/var/run/docker.sock:rw" -v ${GITHUB_WORKSPACE}:/tmp/lint ${{ fromJson(steps.meta.outputs.json).tags[0]}} | ||
timeout-minutes: 30 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
# Copy ghrc.io image to Docker Hub (main image) | ||
- name: Debug output | ||
run: "echo \"Tag steps.meta.outputs.tags: ${{ fromJson(steps.meta-dhub.outputs.json).tags[0]}}\"" | ||
- name: Pull image from GHCR | ||
run: docker system prune -a --force && docker pull "${{ fromJson(steps.meta.outputs.json).tags[0]}}" | ||
- name: Tag image for Docker Hub | ||
run: docker tag "${{ fromJson(steps.meta.outputs.json).tags[0]}}" "${{ fromJson(steps.meta-dhub.outputs.json).tags[0]}}" | ||
- name: Push image to Docker Hub | ||
run: docker push "${{ fromJson(steps.meta-dhub.outputs.json).tags[0]}}" | ||
|
||
############################################## | ||
# Check Docker image security with Trivy # | ||
############################################## | ||
- name: Run Trivy vulnerability scanner | ||
uses: aquasecurity/trivy-action@master | ||
with: | ||
image-ref: "docker.io/${{ fromJson(steps.meta.outputs.json).tags[0] }}" | ||
image-ref: "${{ fromJson(steps.meta-dhub.outputs.json).tags[0]}}" | ||
format: "table" | ||
exit-code: "1" | ||
ignore-unfixed: true | ||
|
Oops, something went wrong.