.. _github_actions: .. highlight:: yaml Github Actions ============== 1. Update your workflow YAML to include a Lager step :: name: Simple to flash a DUT and run tests on: [push] env: LAGER_GATEWAY: helpful-horse jobs: lager_testrun: runs-on: ubuntu-latest steps: - name: Connect to debugger uses: docker://lagerdata/lager-cli:v0.1.41 env: LAGER_SECRET_TOKEN: ${{ secrets.LAGER_SECRET_TOKEN }} with: entrypoint: /usr/local/bin/lager args: connect --device nrf52 --force - name: Flash and run uses: docker://lagerdata/lager-cli:v0.1.41 env: LAGER_SECRET_TOKEN: ${{ secrets.LAGER_SECRET_TOKEN }} with: entrypoint: /usr/local/bin/lager args: testrun --serial-device /dev/ttyACM0 --hexfile _build/test-example.hex 2. Add ``LAGER_SECRET_TOKEN`` as a repository secret .. figure:: /_static/img/github-1.png :scale: 50 % :alt: Image of repository page with arrow pointing to "Settings". :align: center On your repository page, click "Settings" .. figure:: /_static/img/github-2.png :scale: 50 % :alt: Image of settings page with arrow pointing to "Secrets". :align: center On the Settings page, click "Secrets" .. figure:: /_static/img/github-3.png :scale: 50 % :alt: Image of secrets page with arrow pointing to "New secret". :align: center On the Secrets page, click "New secret" .. figure:: /_static/img/github-4.png :scale: 50 % :alt: Image of secrets page with arrow pointing to "New secret". :align: center For the name, enter ``LAGER_SECRET_TOKEN``. The value can be retrieved from your `account page `_. Within a workflow you can use ``${{ secrets.LAGER_SECRET_TOKEN }}`` to access the secret .. figure:: /_static/img/github-5.png :scale: 50 % :alt: Image of secrets page after adding a new secret :align: center Click "Add secret" and your new secret should be listed on the secrets page