mirror of
https://github.com/super-linter/super-linter.git
synced 2024-11-30 01:51:05 -05:00
55bdf97202
Bumps [actions/checkout](https://github.com/actions/checkout) from v2.3.2 to v2.3.3. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2.3.2...a81bbbf8298c0fa03ea29cdc473d45769f953675) Signed-off-by: dependabot[bot] <support@github.com>
85 lines
2.9 KiB
YAML
85 lines
2.9 KiB
YAML
---
|
|
#########################
|
|
#########################
|
|
## Deploy Docker Image ##
|
|
#########################
|
|
#########################
|
|
|
|
#
|
|
# Documentation:
|
|
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
|
|
#
|
|
|
|
#######################################
|
|
# Start the job on all push to master #
|
|
#######################################
|
|
#############################
|
|
# Start the job on all push #
|
|
#############################
|
|
on:
|
|
push:
|
|
branches-ignore: [master]
|
|
pull_request:
|
|
branches-ignore: []
|
|
|
|
###############
|
|
# Set the Job #
|
|
###############
|
|
jobs:
|
|
build:
|
|
# Name the Job
|
|
name: Deploy Docker Image - DEV
|
|
# Set the agent to run on
|
|
runs-on: ubuntu-latest
|
|
# Prevent duplicate run from happening when a forked push is committed
|
|
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
|
|
##################
|
|
# Load all steps #
|
|
##################
|
|
steps:
|
|
##########################
|
|
# Checkout the code base #
|
|
##########################
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v2.3.3
|
|
|
|
########################
|
|
# Get the current date #
|
|
########################
|
|
- name: Get current date
|
|
run: echo "::set-env name=BUILD_DATE::$(date -u +'%Y-%m-%dT%H:%M:%SZ')"
|
|
|
|
###################################
|
|
# Build image locally for testing #
|
|
###################################
|
|
- name: Build image
|
|
shell: bash
|
|
run: docker build --build-arg "BUILD_DATE=${BUILD_DATE}" --build-arg "BUILD_REVISION=${GITHUB_SHA}" --build-arg "BUILD_VERSION=${GITHUB_SHA}" --no-cache -t github/super-linter:${GITHUB_SHA} .
|
|
|
|
########################################
|
|
# Validates the metadata docker labels #
|
|
########################################
|
|
- name: Run Docker label test cases
|
|
shell: bash
|
|
run: .automation/validate-docker-labels.sh
|
|
|
|
#####################################
|
|
# Run Linter against Test code base #
|
|
#####################################
|
|
- name: Run Test Cases
|
|
shell: bash
|
|
run: docker run -e RUN_LOCAL=true -e TEST_CASE_RUN=true -e OUTPUT_FORMAT=tap -e OUTPUT_FOLDER=${GITHUB_SHA} -e OUTPUT_DETAILS=detailed -v ${GITHUB_WORKSPACE}:/tmp/lint github/super-linter:${GITHUB_SHA}
|
|
|
|
#########################################
|
|
# Clean code base to run against it all #
|
|
#########################################
|
|
- name: Clean Test code base for additional testing
|
|
shell: bash
|
|
run: .automation/clean-code-base-for-tests.sh
|
|
|
|
############################################
|
|
# Run Linter against ALL cleaned code base #
|
|
############################################
|
|
- name: Run against all code base
|
|
shell: bash
|
|
run: docker run -e RUN_LOCAL=true -e OUTPUT_DETAILS=detailed -v ${GITHUB_WORKSPACE}:/tmp/lint github/super-linter:${GITHUB_SHA}
|