Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fix building included images. #91

Merged
merged 4 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion .github/workflows/base-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,31 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push tagged image
uses: docker/bake-action@v4
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-11-epics-7' }}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a new spot to change in #84

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
push: ${{ github.event_name == 'push' && vars.PUSH_TO_REGISTRY == 'true' && github.ref_type == 'tag' }}
36 changes: 0 additions & 36 deletions .github/workflows/included-images.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/ioc-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push tagged image
uses: docker/bake-action@v4
uses: docker/bake-action@v5
with:
workdir: ./
files: docker-compose.yml
Expand Down
2 changes: 1 addition & 1 deletion base/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ services:
org.opencontainers.image.source: ${SOURCE:-https://github.com/cnpem/epics-in-docker}
org.opencontainers.image.description: "EPICS base and modules build image"
args:
JOBS: ${JOBS:-1}
JOBS: ${JOBS:--1}
DEBIAN_VERSION: 11.9
5 changes: 5 additions & 0 deletions base/install-functions.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
if [ "$JOBS" -eq "-1" ]; then
JOBS=$(nproc)
echo "Setting JOBS to $JOBS" >&2
fi

get_module_path() {
for module in $@; do
if [ -n "$module" ]; then
Expand Down
2 changes: 1 addition & 1 deletion base/musl/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ services:
org.opencontainers.image.source: ${SOURCE:-https://github.com/cnpem/epics-in-docker}
org.opencontainers.image.description: "EPICS base and modules build image for fully static executables"
args:
JOBS: ${JOBS:-1}
JOBS: ${JOBS:--1}
ALPINE_VERSION: 3.20.3
2 changes: 1 addition & 1 deletion images/docker-compose-mca.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
services:
ioc:
mca:
image: ghcr.io/cnpem/mca-epics-ioc:$TAG
build:
context: ./
Expand Down
2 changes: 1 addition & 1 deletion images/docker-compose-motorpigcs2.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
services:
ioc:
motor-pigcs2:
image: ghcr.io/cnpem/motor-pigcs2-epics-ioc:$TAG
build:
context: ./
Expand Down
2 changes: 1 addition & 1 deletion images/docker-compose-opcua.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
services:
ioc:
opcua:
image: ghcr.io/cnpem/opcua-epics-ioc:$TAG
build:
context: ./
Expand Down
Loading