From ee887a440b63bcc7fafafcc0d1414ccf228ab30f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Nogueira?= Date: Fri, 10 May 2024 11:44:21 -0300 Subject: [PATCH] ci: build OPCUA image in CI. 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 --- .github/workflows/included-images.yml | 33 +++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/included-images.yml diff --git a/.github/workflows/included-images.yml b/.github/workflows/included-images.yml new file mode 100644 index 0000000..31702a8 --- /dev/null +++ b/.github/workflows/included-images.yml @@ -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