Skip to content

feat/minor: add banner to inform this is a beta version #251

feat/minor: add banner to inform this is a beta version

feat/minor: add banner to inform this is a beta version #251

name: Build Docker Image
on:
pull_request:
branches:
- master
push:
branches:
- master
release:
types:
- published
permissions:
contents: read
packages: write
concurrency:
group: build-${{ github.event_name == 'pull_request' && github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
# https://github.com/actions/checkout/releases/tag/v6.0.2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4
# https://github.com/docker/setup-buildx-action/releases/tag/v4.0.0
- name: Login to GitHub Container Registry
if: github.event_name == 'release'
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4
# https://github.com/docker/login-action/tree/v4.1.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Docker image
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7
# https://github.com/docker/build-push-action/releases/tag/v7.0.0
with:
platforms: linux/amd64
push: ${{ github.event_name == 'release' }}
tags: |
ghcr.io/deltablot/eln.community:latest
ghcr.io/deltablot/eln.community:${{ github.event_name == 'release' && github.event.release.tag_name || github.sha }}
build-args: |
VERSION=${{ github.event_name == 'release' && github.event.release.tag_name || github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max