mirror of
https://github.com/super-linter/super-linter.git
synced 2024-11-26 10:41:04 -05:00
parent
156024e231
commit
848d9d911d
2 changed files with 65 additions and 45 deletions
53
.github/workflows/deploy-PROD.yml
vendored
53
.github/workflows/deploy-PROD.yml
vendored
|
@ -45,31 +45,40 @@ jobs:
|
||||||
- name: Get current date
|
- name: Get current date
|
||||||
run: echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> ${GITHUB_ENV}
|
run: echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> ${GITHUB_ENV}
|
||||||
|
|
||||||
#####################
|
###############################
|
||||||
# Run Deploy script #
|
# Login to DockerHub registry #
|
||||||
#####################
|
###############################
|
||||||
- name: Deploy latest image to DockerHub
|
- name: Login to DockerHub
|
||||||
uses: whoan/docker-build-with-cache-action@v5
|
uses: docker/login-action@v1
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
image_name: github/super-linter
|
|
||||||
image_tag: "latest,v3"
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
build_extra_args: "--build-arg=BUILD_DATE=${{ env.BUILD_DATE }} --build-arg=BUILD_REVISION=${{ github.sha }} --build-arg=BUILD_VERSION=${{ github.sha }}"
|
|
||||||
push_image_and_stages: true
|
|
||||||
|
|
||||||
#############################
|
######################################
|
||||||
# Run Deploy script for GPR #
|
# Login to GitHub Container registry #
|
||||||
#############################
|
######################################
|
||||||
- name: Deploy Latest image to GitHub Container Registry
|
- name: Login to GitHub Container Registry
|
||||||
uses: whoan/docker-build-with-cache-action@v5
|
uses: docker/login-action@v1
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.GCR_USERNAME }}
|
|
||||||
password: ${{ secrets.GCR_TOKEN }}
|
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
image_name: github/super-linter
|
username: ${{ github.GCR_USERNAME }}
|
||||||
image_tag: "latest,v3"
|
password: ${{ secrets.GCR_TOKEN }}
|
||||||
dockerfile: Dockerfile
|
|
||||||
build_extra_args: "--build-arg=BUILD_DATE=${{ env.BUILD_DATE }} --build-arg=BUILD_REVISION=$${{ github.sha }} --build-arg=BUILD_VERSION=${{ github.sha }}"
|
###########################################
|
||||||
push_image_and_stages: true
|
# Build and Push containers to registries #
|
||||||
|
###########################################
|
||||||
|
- name: Build and push
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: ./Dockerfile
|
||||||
|
build-args: |
|
||||||
|
BUILD_DATE=${{ env.BUILD_DATE }}
|
||||||
|
BUILD_REVISION=${{ github.sha }}
|
||||||
|
BUILD_VERSION=${{ github.sha }}
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
github/super-linter:latest
|
||||||
|
github/super-linter:v3
|
||||||
|
ghcr.io/github/super-linter:latest
|
||||||
|
ghcr.io/github/super-linter:v3
|
||||||
|
|
57
.github/workflows/deploy-RELEASE.yml
vendored
57
.github/workflows/deploy-RELEASE.yml
vendored
|
@ -45,31 +45,42 @@ jobs:
|
||||||
- name: Get current date
|
- name: Get current date
|
||||||
run: echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> ${GITHUB_ENV}
|
run: echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> ${GITHUB_ENV}
|
||||||
|
|
||||||
###################################
|
###############################
|
||||||
# Run Deploy script for Dockerhub #
|
# Login to DockerHub registry #
|
||||||
###################################
|
###############################
|
||||||
- name: Deploy Release image to Dockerhub
|
- name: Login to DockerHub
|
||||||
uses: whoan/docker-build-with-cache-action@v5
|
uses: docker/login-action@v1
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
image_name: github/super-linter
|
|
||||||
image_tag: ${{ github.event.release.tag_name }}
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
build_extra_args: "--build-arg=BUILD_DATE=${{ env.BUILD_DATE }} --build-arg=BUILD_REVISION=${{ github.sha }} --build-arg=BUILD_VERSION=${{ github.sha }}"
|
|
||||||
push_image_and_stages: true
|
|
||||||
|
|
||||||
###################################################
|
######################################
|
||||||
# Run Deploy script for GitHub Container Registry #
|
# Login to GitHub Container registry #
|
||||||
###################################################
|
######################################
|
||||||
- name: Deploy Release image to GitHub Container Registry
|
- name: Login to GitHub Container Registry
|
||||||
uses: whoan/docker-build-with-cache-action@v5
|
uses: docker/login-action@v1
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.GCR_USERNAME }}
|
registry: ghcr.io
|
||||||
password: ${{ secrets.GCR_PASSWORD }}
|
username: ${{ github.GCR_USERNAME }}
|
||||||
repository: ghcr.io
|
password: ${{ secrets.GCR_TOKEN }}
|
||||||
image_name: github/super-linter
|
|
||||||
image_tag: ${{ github.event.release.tag_name }}
|
###########################################
|
||||||
dockerfile: Dockerfile
|
# Build and Push containers to registries #
|
||||||
build_extra_args: "--build-arg=BUILD_DATE=${{ github.event.timestamp }}Z --build-arg=BUILD_REVISION=${{ github.sha }} --build-arg=BUILD_VERSION=${{ github.sha }}"
|
###########################################
|
||||||
push_image_and_stages: true
|
- name: Build and push
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: ./Dockerfile
|
||||||
|
build-args: |
|
||||||
|
BUILD_DATE=${{ env.BUILD_DATE }}
|
||||||
|
BUILD_REVISION=${{ github.sha }}
|
||||||
|
BUILD_VERSION=${{ github.sha }}
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
github/super-linter:latest
|
||||||
|
github/super-linter:v3
|
||||||
|
github/super-linter:${{ github.event.release.tag_name }}
|
||||||
|
ghcr.io/github/super-linter:latest
|
||||||
|
ghcr.io/github/super-linter:v3
|
||||||
|
ghcr.io/github/super-linter:${{ github.event.release.tag_name }}
|
||||||
|
|
Loading…
Reference in a new issue