cant do load and push, skipping for prod (#2394)

This commit is contained in:
Lukas Gravley 2022-01-26 12:00:55 -06:00 committed by GitHub
parent c0f47d0eff
commit d1fceae857
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 3 deletions

View file

@ -71,6 +71,7 @@ jobs:
# Build local docker images for tests # # Build local docker images for tests #
####################################### #######################################
- name: Build Docker image - ${{ matrix.images.image-id }} - name: Build Docker image - ${{ matrix.images.image-id }}
if: ${{ github.repository == 'github/super-linter' && github.ref != 'refs/heads/main' }}
uses: docker/build-push-action@v2.7.0 uses: docker/build-push-action@v2.7.0
with: with:
cache-from: type=gha cache-from: type=gha
@ -92,6 +93,7 @@ jobs:
# Run local docker labels test # # Run local docker labels test #
################################ ################################
- name: Run Docker label test cases - name: Run Docker label test cases
if: ${{ github.repository == 'github/super-linter' && github.ref != 'refs/heads/main' }}
shell: bash shell: bash
run: .automation/validate-docker-labels.sh "${{ matrix.images.image-id }}" run: .automation/validate-docker-labels.sh "${{ matrix.images.image-id }}"
@ -99,6 +101,7 @@ jobs:
# Edit the action.yml for local tests # # Edit the action.yml for local tests #
####################################### #######################################
- name: Edit an action.yml file for test local build - name: Edit an action.yml file for test local build
if: ${{ github.repository == 'github/super-linter' && github.ref != 'refs/heads/main' }}
run: | run: |
sed -i "s/super-linter:.*/super-linter:${{ matrix.images.container-image-id-prefix }}${GITHUB_SHA}'/g" action.yml sed -i "s/super-linter:.*/super-linter:${{ matrix.images.container-image-id-prefix }}${GITHUB_SHA}'/g" action.yml
@ -106,6 +109,7 @@ jobs:
# Gather information # # Gather information #
###################### ######################
- name: Gather information about the runtime environment - name: Gather information about the runtime environment
if: ${{ github.repository == 'github/super-linter' && github.ref != 'refs/heads/main' }}
shell: bash shell: bash
run: | run: |
make info make info
@ -115,6 +119,7 @@ jobs:
# Not the container directly, and not using RUN_LOCAL=true # # Not the container directly, and not using RUN_LOCAL=true #
############################################################ ############################################################
- name: Test the local action - name: Test the local action
if: ${{ github.repository == 'github/super-linter' && github.ref != 'refs/heads/main' }}
uses: ./ uses: ./
env: env:
ACTIONS_RUNNER_DEBUG: true ACTIONS_RUNNER_DEBUG: true
@ -128,6 +133,7 @@ jobs:
# Workaround for https://github.com/actions/runner/issues/434 # # Workaround for https://github.com/actions/runner/issues/434 #
############################################################### ###############################################################
- name: Fix file and directory ownership - name: Fix file and directory ownership
if: ${{ github.repository == 'github/super-linter' && github.ref != 'refs/heads/main' }}
shell: bash shell: bash
run: | run: |
sudo chown -R "$(id -u)":"$(id -g)" "$(pwd)" sudo chown -R "$(id -u)":"$(id -g)" "$(pwd)"
@ -136,6 +142,7 @@ jobs:
# Run local make tests # # Run local make tests #
######################## ########################
- name: Run the test suite - name: Run the test suite
if: ${{ github.repository == 'github/super-linter' && github.ref != 'refs/heads/main' }}
shell: bash shell: bash
run: | run: |
make IMAGE=${{ matrix.images.image-id }} test make IMAGE=${{ matrix.images.image-id }} test
@ -144,7 +151,7 @@ jobs:
# Codacy Coverage Report # # Codacy Coverage Report #
########################## ##########################
- name: Upload the code coverage report - name: Upload the code coverage report
if: ${{ github.repository == 'github/super-linter' }} if: ${{ github.repository == 'github/super-linter' && github.ref != 'refs/heads/main' }}
uses: codacy/codacy-coverage-reporter-action@v1.1 uses: codacy/codacy-coverage-reporter-action@v1.1
with: with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
@ -154,6 +161,7 @@ jobs:
# Run Linter against Test code base # # Run Linter against Test code base #
##################################### #####################################
- name: Run Test Cases - ${{ matrix.images.image-id }} - name: Run Test Cases - ${{ matrix.images.image-id }}
if: ${{ github.repository == 'github/super-linter' && github.ref != 'refs/heads/main' }}
shell: bash shell: bash
run: | run: |
docker run \ docker run \
@ -169,6 +177,7 @@ jobs:
# Clean code base to run against it all # # Clean code base to run against it all #
######################################### #########################################
- name: Clean Test code base for additional testing - name: Clean Test code base for additional testing
if: ${{ github.repository == 'github/super-linter' && github.ref != 'refs/heads/main' }}
shell: bash shell: bash
run: .automation/clean-code-base-for-tests.sh run: .automation/clean-code-base-for-tests.sh
@ -176,6 +185,7 @@ jobs:
# Run Linter against ALL cleaned code base # # Run Linter against ALL cleaned code base #
############################################ ############################################
- name: Run against all code base - ${{ matrix.images.image-id }} - name: Run against all code base - ${{ matrix.images.image-id }}
if: ${{ github.repository == 'github/super-linter' && github.ref != 'refs/heads/main' }}
shell: bash shell: bash
run: | run: |
docker run \ docker run \
@ -241,7 +251,7 @@ jobs:
BUILD_DATE=${{ env.BUILD_DATE }} BUILD_DATE=${{ env.BUILD_DATE }}
BUILD_REVISION=${{ github.sha }} BUILD_REVISION=${{ github.sha }}
BUILD_VERSION=${{ github.sha }} BUILD_VERSION=${{ github.sha }}
load: true load: false
push: true push: true
tags: | tags: |
github/super-linter:${{ matrix.images.container-image-id-prefix }}latest github/super-linter:${{ matrix.images.container-image-id-prefix }}latest

View file

@ -120,7 +120,7 @@ jobs:
BUILD_DATE=${{ env.BUILD_DATE }} BUILD_DATE=${{ env.BUILD_DATE }}
BUILD_REVISION=${{ github.sha }} BUILD_REVISION=${{ github.sha }}
BUILD_VERSION=${{ github.sha }} BUILD_VERSION=${{ github.sha }}
load: true load: false
push: true push: true
tags: | tags: |
github/super-linter:${{ matrix.images.container-image-id-prefix }}latest github/super-linter:${{ matrix.images.container-image-id-prefix }}latest