2019-11-08 09:31:16 -05:00
|
|
|
---
|
|
|
|
#########################
|
|
|
|
#########################
|
|
|
|
## Deploy Docker Image ##
|
|
|
|
#########################
|
|
|
|
#########################
|
|
|
|
|
|
|
|
#
|
|
|
|
# Documentation:
|
|
|
|
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
|
|
|
|
#
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
# Start the job on all push to master #
|
|
|
|
#######################################
|
2019-11-08 09:39:18 -05:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- 'master'
|
2019-11-08 09:31:16 -05:00
|
|
|
|
|
|
|
###############
|
|
|
|
# Set the Job #
|
|
|
|
###############
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
# Name the Job
|
2020-01-09 14:04:41 -05:00
|
|
|
name: Deploy Docker Image - PROD
|
2019-11-08 09:31:16 -05:00
|
|
|
# Set the agent to run on
|
|
|
|
runs-on: ubuntu-latest
|
2020-08-10 18:55:52 -04:00
|
|
|
# Only run this
|
|
|
|
if: github.repository == 'github/super-linter'
|
2019-11-08 09:31:16 -05:00
|
|
|
##################
|
|
|
|
# Load all steps #
|
|
|
|
##################
|
|
|
|
steps:
|
2019-11-08 09:45:57 -05:00
|
|
|
##########################
|
|
|
|
# Checkout the code base #
|
|
|
|
##########################
|
|
|
|
- name: Checkout Code
|
2020-08-10 01:38:32 -04:00
|
|
|
uses: actions/checkout@v2.3.2
|
2019-11-08 09:45:57 -05:00
|
|
|
|
|
|
|
#####################
|
|
|
|
# Run Deploy script #
|
|
|
|
#####################
|
2020-06-23 13:08:33 -04:00
|
|
|
- name: Deploy latest image to DockerHub
|
2019-11-08 09:42:17 -05:00
|
|
|
env:
|
|
|
|
# Set the Env Vars
|
|
|
|
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
|
|
|
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
2020-06-18 14:53:45 -04:00
|
|
|
IMAGE_REPO: github/super-linter
|
2019-11-08 09:42:17 -05:00
|
|
|
IMAGE_VERSION: latest
|
|
|
|
DOCKERFILE_PATH: Dockerfile
|
2020-06-23 13:08:33 -04:00
|
|
|
REGISTRY: Docker
|
2019-11-08 09:31:16 -05:00
|
|
|
shell: bash
|
|
|
|
run: .automation/upload-docker.sh
|