Skip to content

Commit

Permalink
ci: build OPCUA image in CI.
Browse files Browse the repository at this point in the history
This workflow will only run for tags for now, since otherwise it would
have to deal with relying on a ${tag}-dev container for the base image.

If we add more included images, we can add a matrix to the workflow
definition to build all their images.

This commit was based on [1].

[1] https://stackoverflow.com/questions/58457140
  • Loading branch information
ericonr committed May 10, 2024
1 parent 9046c12 commit ee887a4
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/included-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build included image
on:
workflow_run:
workflows: ["Base image build"]
tags:
- 'v*'
types:
- completed

jobs:
build_and_push:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
env:
REGISTRY: ghcr.io/${{ github.repository_owner }}
TAG: ${{ github.ref_name }}
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- name: Log in to registry
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@v4
with:
workdir: images/
files: docker-compose-opcua.yml
push: true

0 comments on commit ee887a4

Please sign in to comment.