mirror of
https://github.com/super-linter/super-linter.git
synced 2024-11-06 09:15:49 -05:00
70 lines
1.9 KiB
YAML
70 lines
1.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'
|
|
|
|
###############
|
|
# Set the Job #
|
|
###############
|
|
jobs:
|
|
build:
|
|
# Name the Job
|
|
name: Deploy Docker Image - DEV
|
|
# Set the agent to run on
|
|
runs-on: ubuntu-latest
|
|
##################
|
|
# Load all steps #
|
|
##################
|
|
steps:
|
|
##########################
|
|
# Checkout the code base #
|
|
##########################
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v2
|
|
|
|
#####################
|
|
# Run Deploy script #
|
|
#####################
|
|
- name: Deploy image to DockerHub
|
|
env:
|
|
# Set the Env Vars
|
|
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
|
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
|
IMAGE_REPO: github/super-linter
|
|
DOCKERFILE_PATH: Dockerfile
|
|
shell: bash
|
|
run: .automation/upload-docker.sh
|
|
|
|
#######################
|
|
# Get the branch name #
|
|
#######################
|
|
- name: Extract branch name
|
|
shell: bash
|
|
run: echo "::set-env name=BRANCH_NAME::$(echo ${GITHUB_REF#refs/heads/} | sed 's/[^[:alnum:]]//g')"
|
|
|
|
################################
|
|
# Run Linter against code base #
|
|
################################
|
|
- name: Run Test Cases
|
|
shell: bash
|
|
run: |
|
|
docker pull github/super-linter:${BRANCH_NAME}
|
|
docker run -e RUN_LOCAL=true -e TEST_CASE_RUN=true -v ${GITHUB_WORKSPACE}:/tmp/lint github/super-linter:${BRANCH_NAME}
|