Skip to content

Push image on push event except dependabot #244

Push image on push event except dependabot

Push image on push event except dependabot #244

Workflow file for this run

name: Tornjak Artifact push
on:
push:
branches-ignore:
- 'dependabot/**'
workflow_dispatch: {}
jobs:
alpine-build:
runs-on: ubuntu-latest
steps:
- name: Show trigger info
run: |
cat <<EOF >>"${GITHUB_STEP_SUMMARY}"
# Workflow job info
- 🎉 The job was automatically triggered by a ${{ github.event_name }} event.
- 🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!
- 🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}.
EOF
- name: Check out repository code
uses: actions/checkout@v4.1.2
- name: Log in to GHCR.io
uses: docker/login-action@v3.1.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get branch name
id: branch_name
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
- name: Run build
uses: ./.github/actions/build
with:
tag-version: ${{ contains(fromJSON('["main", "v1.6"]'), steps.branch_name.outputs.branch) && true || false }}
- name: Print job result
run: |
cat <<EOF >>"${GITHUB_STEP_SUMMARY}"
- 🍏 This job's status is ${{ job.status }}.
EOF
ubi-build:
runs-on: ubuntu-latest
steps:
- name: Show trigger info
run: |
cat <<EOF >>"${GITHUB_STEP_SUMMARY}"
# Workflow job info
- 🎉 The job was automatically triggered by a ${{ github.event_name }} event.
- 🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!
- 🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}.
EOF
- name: Check out repository code
uses: actions/checkout@v4.1.2
- name: Log in to GHCR.io
uses: docker/login-action@v3.1.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get branch name
id: branch_name
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
- name: Run build
uses: ./.github/actions/build
with:
image-tag-prefix: ubi-
backend-dockerfile: Dockerfile.backend-container.ubi
frontend-dockerfile: frontend/Dockerfile.frontend-container.ubi
tag-version: ${{ contains(fromJSON('["main", "v1.6"]'), steps.branch_name.outputs.branch) && true || false }}
- name: Print job result
run: |
cat <<EOF >>"${GITHUB_STEP_SUMMARY}"
- 🍏 This job's status is ${{ job.status }}.
EOF