Skip to content

Commit

Permalink
cant do load and push, skipping for prod (super-linter#2394)
Browse files Browse the repository at this point in the history
  • Loading branch information
admiralAwkbar authored and sarahc23 committed May 6, 2022
1 parent ab8d75f commit fe7c8f8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/deploy-Production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ jobs:
# Build local docker images for tests #
#######################################
- 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
with:
cache-from: type=gha
Expand All @@ -92,20 +93,23 @@ jobs:
# Run local docker labels test #
################################
- name: Run Docker label test cases
if: ${{ github.repository == 'github/super-linter' && github.ref != 'refs/heads/main' }}
shell: bash
run: .automation/validate-docker-labels.sh "${{ matrix.images.image-id }}"

#######################################
# Edit the action.yml for local tests #
#######################################
- name: Edit an action.yml file for test local build
if: ${{ github.repository == 'github/super-linter' && github.ref != 'refs/heads/main' }}
run: |
sed -i "s/super-linter:.*/super-linter:${{ matrix.images.container-image-id-prefix }}${GITHUB_SHA}'/g" action.yml
######################
# Gather information #
######################
- name: Gather information about the runtime environment
if: ${{ github.repository == 'github/super-linter' && github.ref != 'refs/heads/main' }}
shell: bash
run: |
make info
Expand All @@ -115,6 +119,7 @@ jobs:
# Not the container directly, and not using RUN_LOCAL=true #
############################################################
- name: Test the local action
if: ${{ github.repository == 'github/super-linter' && github.ref != 'refs/heads/main' }}
uses: ./
env:
ACTIONS_RUNNER_DEBUG: true
Expand All @@ -128,6 +133,7 @@ jobs:
# Workaround for https://github.com/actions/runner/issues/434 #
###############################################################
- name: Fix file and directory ownership
if: ${{ github.repository == 'github/super-linter' && github.ref != 'refs/heads/main' }}
shell: bash
run: |
sudo chown -R "$(id -u)":"$(id -g)" "$(pwd)"
Expand All @@ -136,6 +142,7 @@ jobs:
# Run local make tests #
########################
- name: Run the test suite
if: ${{ github.repository == 'github/super-linter' && github.ref != 'refs/heads/main' }}
shell: bash
run: |
make IMAGE=${{ matrix.images.image-id }} test
Expand All @@ -144,7 +151,7 @@ jobs:
# Codacy 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
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
Expand All @@ -154,6 +161,7 @@ jobs:
# Run Linter against Test code base #
#####################################
- name: Run Test Cases - ${{ matrix.images.image-id }}
if: ${{ github.repository == 'github/super-linter' && github.ref != 'refs/heads/main' }}
shell: bash
run: |
docker run \
Expand All @@ -169,13 +177,15 @@ jobs:
# Clean code base to run against it all #
#########################################
- name: Clean Test code base for additional testing
if: ${{ github.repository == 'github/super-linter' && github.ref != 'refs/heads/main' }}
shell: bash
run: .automation/clean-code-base-for-tests.sh

############################################
# Run Linter against ALL cleaned code base #
############################################
- name: Run against all code base - ${{ matrix.images.image-id }}
if: ${{ github.repository == 'github/super-linter' && github.ref != 'refs/heads/main' }}
shell: bash
run: |
docker run \
Expand Down Expand Up @@ -241,7 +251,7 @@ jobs:
BUILD_DATE=${{ env.BUILD_DATE }}
BUILD_REVISION=${{ github.sha }}
BUILD_VERSION=${{ github.sha }}
load: true
load: false
push: true
tags: |
github/super-linter:${{ matrix.images.container-image-id-prefix }}latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ jobs:
BUILD_DATE=${{ env.BUILD_DATE }}
BUILD_REVISION=${{ github.sha }}
BUILD_VERSION=${{ github.sha }}
load: true
load: false
push: true
tags: |
github/super-linter:${{ matrix.images.container-image-id-prefix }}latest
Expand Down

0 comments on commit fe7c8f8

Please sign in to comment.