Skip to content

added ioc instance for TetrAMM #4

added ioc instance for TetrAMM

added ioc instance for TetrAMM #4

Workflow file for this run

name: Build and publish image to ghcr.io/epics-containers
on:
push:
pull_request:
jobs:
build-push-images:
# pull requests are a duplicate of a branch push if within the same repo.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
permissions:
contents: read
packages: write
strategy:
fail-fast: false
max-parallel: 1 # take advantage of caching
matrix:
target: [developer, runtime]
architecture: [linux]
include:
- os: ubuntu-latest
platforms: linux/amd64
runs-on: ${{ matrix.os }}
env:
TAG: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-${{ matrix.architecture }}-${{ matrix.target }}:${{ github.ref_name }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Log in to GitHub Docker Registry
uses: docker/login-action@v3
with:
registry: ghcr.io/${{ github.repository_owner }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build image
uses: docker/build-push-action@v5
with:
context: .
platforms: ${{ matrix.platforms }}
target: ${{ matrix.target }}
build-args: TARGET_ARCHITECTURE=${{ matrix.architecture }}
tags: ${{ env.TAG }}
cache-from: type=gha
cache-to: type=gha,mode=max
load: true
- name: Test image
run: tests/run-tests.sh
- name: Push image
if: ${{ github.event_name == 'push' && github.ref_type == 'tag' }}
uses: docker/build-push-action@v5
with:
context: .
platforms: ${{ matrix.platforms }}
target: ${{ matrix.target }}
build-args: TARGET_ARCHITECTURE=${{ matrix.architecture }}
tags: ${{ env.TAG }}
push: true
release:
# Release on tag push - publish ioc schema
needs: [build-push-images]
if: ${{ github.event_name == 'push' && github.ref_type == 'tag' }}
runs-on: ubuntu-latest
# this job runs in the (linux) developer container we just made
container:
image: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-linux-developer:${{ github.ref_name }}
steps:
- name: generate-schema
run: |
ibek ioc generate-schema --output ibek.ioc.schema.json
- name: Github Release
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v0.1.15
with:
files: |
ibek.ioc.schema.json
generate_release_notes: true