Skip to content

Commit

Permalink
initial version
Browse files Browse the repository at this point in the history
  • Loading branch information
gilesknap committed Jul 16, 2024
1 parent 6505c82 commit 9b20f49
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# We no longer look for updates to docker and python dependencies in ioc-xxx
# projects.
#
# This is because they should be updated in a controlled manner using the
# copier template so that all changes are kept in sync.

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every weekday
interval: "monthly"
69 changes: 69 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Build and publish image to ghcr.io/epics-containers

on:
push:
pull_request:

jobs:
build:
# 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
matrix:
include:
- os: ubuntu-latest # everyone is on ubuntu-latest

runs-on: ${{ matrix.os }}
env:
TAG: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}
steps:

- 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:
tags: ci_test
load: true

- name: Push developer image
if: ${{ github.event_name == 'push' && github.ref_type == 'tag' }}
uses: docker/build-push-action@v5
with:
tags: ${{ env.TAG }}:${{ github.ref_name }}
push: true


release:
# Release on tag push - publish ioc schema
needs: [build]
if: ${{ github.event_name == 'push' && github.ref_type == 'tag' }}
runs-on: ubuntu-latest

# this job runs in the native developer container we just made
container:
image: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-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
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM alpine:3.20.1

RUN apk update && apk add inotify-tools
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Lightweight utility container for epics-containers

Used to run alongside an IOC container to monitor the state of its configMap
and restart it when it changes.

0 comments on commit 9b20f49

Please sign in to comment.