feat: Add ingression investigator #461
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
# Triggers the workflow on push or pull request events but only for the main branch | |
push: | |
branches: [main] | |
paths-ignore: ["**.md"] | |
pull_request: | |
branches: [main] | |
paths-ignore: ["**.md"] | |
workflow_dispatch: | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Determine Tag | |
run: | | |
COMMIT_ID=$(git rev-parse --short HEAD) | |
CURRENT_DATE=$(date +'%Y-%m-%d') | |
BUILD_VERSION=${CURRENT_DATE}.${COMMIT_ID}.${GITHUB_RUN_NUMBER} | |
[ "${{ github.event_name }}" == "pull_request" ] && export VERSION=${BUILD_VERSION}-dev || export VERSION=${BUILD_VERSION} | |
echo "VERSION=$VERSION" >> $GITHUB_ENV | |
echo "REPO=theliv" >> $GITHUB_ENV | |
echo "using ${{ env.VERSION }} as the release version" | |
- name: Login to GitHub Container Registry | |
if: github.event_name == 'push' | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push Docker image | |
id: build-and-push | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
file: ./build/Dockerfile | |
push: ${{ github.event_name == 'push' }} | |
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} |