Skip to content

Fixing Multiplatform Builds #198

Fixing Multiplatform Builds

Fixing Multiplatform Builds #198

---

Check failure on line 1 in .github/workflows/deploy-ALPHA-flavors.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/deploy-ALPHA-flavors.yml

Invalid workflow file

Cannot define both `uses` and `steps` at the same time for the following jobs: build
#########################
#########################
## Deploy Docker Image Flavors ##
#########################
#########################
#
# Documentation:
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
#
#######################################
# Start the job on all push to main #
#######################################
name: "Build & Deploy - ALPHA Flavors"
on:
push:
branches:
- "alpha"
paths:
- ".github/workflows/**"
- "Dockerfile"
- "flavors/**"
- "megalinter/**"
- "mega-linter-runner/**"
- "server/**"
- "**/linter-versions.json"
- "TEMPLATES/**"
- ".trivyignore"
- "**/.sh"
###############
# Set the Job #
###############
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
build:
# Name the Job
name: Deploy Docker Image - ALPHA - Flavors
permissions:
packages: write
# Only run this on the main repo
if: github.repository == 'oxsecurity/megalinter' && !contains(github.event.head_commit.message, 'skip deploy')
uses: ./.github/workflows/-build-docker.yml
with:
tagTemplate: "alpha"
shouldLoginDockerHub: false
shouldLoginGithub: true
dockerfile: flavors/${{ matrix.flavor }}/Dockerfile
push: true
imageName: megalinter-${{ matrix.flavor }}
workerImageName: megalinter-worker-${{ matrix.flavor }}
strategy:
fail-fast: false
max-parallel: 10
matrix:
# flavors-start
flavor:
[
"ci_light",
"cupcake",
"documentation",
"dotnet",
"go",
"java",
"javascript",
"php",
"python",
"ruby",
"rust",
"salesforce",
"security",
"swift",
"terraform",
]
# flavors-end
##################
# Load all steps #
##################
steps:
##############################################
# Check Docker image security with Trivy #
##############################################
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: 'docker.io/oxsecurity/megalinter-${{ matrix.flavor }}:alpha'
format: 'table'
exit-code: '1'
ignore-unfixed: true
scanners: vuln
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'
timeout: 10m0s