Skip to content
briefcase

GitHub Action

Docker Compose Mender Artifact

v1.1.2 Latest version

Docker Compose Mender Artifact

briefcase

Docker Compose Mender Artifact

Create a mender artifact to install docker containers using a docker-compose file

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Docker Compose Mender Artifact

uses: quartx-analytics/[email protected]

Learn more about this action in quartx-analytics/mender-docker-compose

Choose a version

Mender Docker Compose Artifact

This action allows you to create artifacts to deploy docker containers to mender devices using docker compose.

Refer mender

Usage

See action.yml

See upload-artifact

Create Artifact

steps:
  - uses: actions/checkout@v2

  - id: mender
    name: Create mender artifact
    uses: quartx-analytics/[email protected]
    with:
      compose-file: "docker-compose.yml"
      software-name: "project-name"
      device-types: "raspberrypi3 raspberrypi4"
      signing-key: "${{ secrets.ARTIFACT_SIGNING_KEY }}"  # Optional
      compose-file-variables: "IMAGE_TAG=latest"  # Optional

  - name: Upload mender artifact
    uses: quartx-analytics/[email protected]
    with:
      artifact: ${{ steps.mender.outputs.artifact-file }}
      username: ${{ secrets.MENDER_USER }}
      password: ${{ secrets.MENDER_PASS }}

Here we specify the filename for the docker compose file, the file that contains all the details required to build the docker container(s). We also need to specify the software name, docker compose uses this for identifying the containers. The device-types are the devices that this artifact will be built for. The artifact will not work on any other device but what is specified. A signing-key can also be specified if required, this will ensure that the artifact has not been changed after creation. It will also force the artifact to only work on the mender server that contains the corresponding private key.

We can then our other action that can upload the mender artifact to a mender server. See upload-artifact

Notes

For the artifact to work on mender, all mender devices need to have docker compose installed. The docker-compose update module from this repo also needs to be placed in the /usr/share/mender/modules/v3 directory on all your mender devices.

License

The scripts and documentation in this project are released under the Apache License