LICENSE: add LICENSE file for GPLv3. #439
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: 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-epics-7 } | |
- { dir: base/musl, name: lnls-alpine-3-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@v4 | |
- uses: docker/setup-buildx-action@v3 | |
- name: Log in to registry | |
if: github.event_name == 'push' && vars.PUSH_TO_REGISTRY == 'true' | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push tagged image | |
uses: docker/bake-action@v5 | |
with: | |
workdir: ${{ matrix.image.dir }} | |
files: docker-compose.yml | |
load: true | |
set: | | |
*.cache-from=type=gha,scope=${{ matrix.image.name }} | |
*.cache-to=type=gha,mode=max,scope=${{ matrix.image.name }} | |
push: ${{ github.event_name == 'push' && vars.PUSH_TO_REGISTRY == 'true' && github.ref_type == 'tag' }} | |
- name: Point IOC Dockerfile to image that was just built | |
run: sed -i "s/v.*-dev/$TAG/" Dockerfile | |
- name: Configure builder using docker driver | |
uses: docker/setup-buildx-action@v3 | |
id: dockerbuilder | |
with: | |
driver: docker | |
- name: Build and push included IOC images | |
if: ${{ matrix.image.name == 'lnls-debian-epics-7' }} | |
uses: docker/bake-action@v5 | |
with: | |
workdir: images/ | |
builder: ${{ steps.dockerbuilder.outputs.name }} | |
allow: fs.read=../Dockerfile | |
files: | | |
docker-compose-opcua.yml | |
docker-compose-motorpigcs2.yml | |
docker-compose-mca.yml | |
docker-compose-pvagw.yml | |
push: ${{ github.event_name == 'push' && vars.PUSH_TO_REGISTRY == 'true' && github.ref_type == 'tag' }} |