Skip to content

base: build epics-base with GCC_PIPE=YES. #131

base: build epics-base with GCC_PIPE=YES.

base: build epics-base with GCC_PIPE=YES. #131

Workflow file for this run

name: Base image build
on:
push:
tags:
- 'v*'
branches:
- main
pull_request:
jobs:
build_and_push:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
strategy:
matrix:
image:
- { dir: base, name: lnls-debian-11-epics-7 }
- { dir: base/musl, name: lnls-alpine-3.18-epics-7 }
env:
TAG: ${{ github.event_name == 'push' && github.ref_name || github.head_ref }}
REGISTRY: ghcr.io/${{ github.repository_owner }}
IMAGE: ${{ matrix.image.name }}
SOURCE: https://github.com/${{ github.repository }}
steps:
- uses: actions/checkout@v3
- name: Build image
run: cd ${{ matrix.image.dir }} && JOBS=$(nproc) docker compose build
- name: Log in to registry
if: github.event_name == 'push' && vars.PUSH_TO_REGISTRY == 'true'
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
- name: Push tagged image
if: github.event_name == 'push' && vars.PUSH_TO_REGISTRY == 'true' && github.ref_type == 'tag'
run: docker push $REGISTRY/$IMAGE:$TAG
- name: Push latest image
if: github.event_name == 'push' && vars.PUSH_TO_REGISTRY == 'true' && github.ref_type == 'branch'
run: |
docker tag $REGISTRY/$IMAGE:$TAG $REGISTRY/$IMAGE:latest
docker push $REGISTRY/$IMAGE:latest