Skip to content

Merge pull request #11 from oxsecurity/OXDEV-15797-add-programming-la… #3

Merge pull request #11 from oxsecurity/OXDEV-15797-add-programming-la…

Merge pull request #11 from oxsecurity/OXDEV-15797-add-programming-la… #3

Workflow file for this run

---
#########################
#########################
## Deploy Docker Image ##
#########################
#########################
#
# Documentation:
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
#
#######################################
# Start the job on all push to main #
#######################################
name: "Build & Push - Beta"
on:
push:
branches:
- development
###############
# Set the Job #
###############
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
build:
name: Build & Push Docker Image - Beta
runs-on: ubuntu-latest
permissions: write-all
# Only run this on the main repo
if: github.repository == 'oxsecurity/codetotal' && !contains(github.event.head_commit.message, 'skip deploy')
steps:
##########################
# Checkout the code base #
##########################
- name: Checkout Code
uses: actions/checkout@v3
#################################################
# Build & publish docker codetotal server image #
#################################################
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get current date
run: echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> ${GITHUB_ENV}
- name: Build & Push CodeTotal Docker Image
uses: docker/build-push-action@v4
with:
context: .
file: Dockerfile
platforms: linux/amd64
build-args: |
BUILD_DATE=${{ env.BUILD_DATE }}
BUILD_REVISION=${{ github.sha }}
BUILD_VERSION=beta
load: false
push: true
secrets: |
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
tags: |
ghcr.io/oxsecurity/codetotal-server:beta
# ghcr.io/oxsecurity/megalinter-server:alpha-${{ github.sha }}