Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy additional Docker images to GitHub Container Registry #2117

Merged
merged 7 commits into from
Jan 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/linters/.cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -1080,6 +1080,7 @@
"regexpp",
"rego",
"regsub",
"reimann",
"reindent",
"relaxng",
"remarkrc",
Expand Down Expand Up @@ -1360,4 +1361,4 @@
"\u0636clojure",
"\u077bcbad"
]
}
}
23 changes: 20 additions & 3 deletions .github/workflows/deploy-ALPHA-flavors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
22 changes: 19 additions & 3 deletions .github/workflows/deploy-BETA-flavors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
36 changes: 33 additions & 3 deletions .github/workflows/deploy-BETA-linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 #
#####################################
Expand Down
17 changes: 16 additions & 1 deletion .github/workflows/deploy-RELEASE-flavors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -108,4 +124,3 @@ jobs:
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'
timeout: 10m0s

23 changes: 20 additions & 3 deletions .github/workflows/deploy-RELEASE-linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 #
#####################################
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down