Skip to content

Commit

Permalink
Reorganize for use
Browse files Browse the repository at this point in the history
  • Loading branch information
danschmidt5189 committed Dec 27, 2024
1 parent 5e303a1 commit 0a5fbe1
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 8 deletions.
29 changes: 29 additions & 0 deletions workflow-templates/docker-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,37 @@ name: Docker CI

on:
push:
release:
workflow_dispatch:

jobs:
prereqs:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Check for required files
run: |
errors=0
required_files=(bin/setup bin/test docker-compose.yml docker-compose.ci.yml)
for file in "${required_files[@]}"; do
if [ -f "$file" ]; then
echo "$file found"
else
echo "$file not found"
errors=$((errors + 1))
fi
done
exit $errors
build:
needs: prereqs
uses: BerkeleyLibrary/.github/workflows/docker-build.yml@main

test:
needs: build
uses: BerkeleyLibrary/.github/workflows/docker-test.yml@main
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Build and push Docker image

on:
- push
- release
- workflow_dispatch
push:
release:
workflow_dispatch:

env:
REGISTRY: ghcr.io
Expand Down Expand Up @@ -95,8 +95,3 @@ jobs:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true

test:
needs: build
if: github.event_name != 'release'
uses: BerkeleyLibrary/.github/workflows/docker-test.yml@main
File renamed without changes.

0 comments on commit 0a5fbe1

Please sign in to comment.