feat(messenger): expose bounded reaction users (#80) #250
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Exordos element | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - master | |
| tags: | |
| - "*" | |
| workflow_dispatch: | |
| inputs: | |
| publish: | |
| description: "Publish the built element to the configured Exordos repository" | |
| required: false | |
| default: false | |
| type: boolean | |
| env: | |
| ARTIFACTS_PATH: output | |
| EXORDOS_CFG: exordos/exordos.yaml | |
| jobs: | |
| build: | |
| runs-on: [self-hosted, vm] | |
| if: ${{ github.actor != 'dependabot[bot]' }} | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install compatible Exordos CLI | |
| env: | |
| EXORDOS_RELEASE_URL: https://github.com/exordos/exordos/releases/download/3.0.2/exordos-linux | |
| EXORDOS_RELEASE_SHA256: 469007b01253f69b5fcf540b8f6605a360c2539019a5b148fbabb0353bee6a5b | |
| run: | | |
| set -euo pipefail | |
| command -v curl | |
| command -v sha256sum | |
| exordos_bin="${RUNNER_TEMP}/exordos" | |
| exordos_download="${exordos_bin}.download" | |
| rm -f "${exordos_download}" | |
| curl --fail --location --silent --show-error \ | |
| --connect-timeout 30 \ | |
| --max-time 180 \ | |
| --retry 4 \ | |
| --retry-all-errors \ | |
| --retry-delay 5 \ | |
| --retry-max-time 600 \ | |
| "${EXORDOS_RELEASE_URL}" \ | |
| --output "${exordos_download}" | |
| printf "%s %s\n" "${EXORDOS_RELEASE_SHA256}" "${exordos_download}" \ | |
| | sha256sum --check --status - | |
| mv "${exordos_download}" "${exordos_bin}" | |
| chmod 0755 "${exordos_bin}" | |
| printf "EXORDOS_BIN=%s\n" "${exordos_bin}" >> "${GITHUB_ENV}" | |
| "${exordos_bin}" version | |
| - name: Check Exordos build prerequisites | |
| run: | | |
| set -euo pipefail | |
| "${EXORDOS_BIN}" version | |
| command -v packer | |
| command -v qemu-img | |
| command -v qemu-system-x86_64 | |
| command -v mkisofs | |
| - name: Build element | |
| run: | | |
| set -euo pipefail | |
| rm -rf "${ARTIFACTS_PATH}" | |
| "${EXORDOS_BIN}" build . \ | |
| --exordos-cfg-file "${EXORDOS_CFG}" \ | |
| --output-dir "${ARTIFACTS_PATH}" \ | |
| --force | |
| - name: Show build output | |
| run: | | |
| set -euo pipefail | |
| find "${ARTIFACTS_PATH}" -maxdepth 4 -type f -printf "%p %s bytes\n" | |
| - name: Publish element | |
| env: | |
| PUBLISH_REQUESTED: ${{ inputs.publish }} | |
| PUSH_CFG: ${{ secrets.PUSH_CFG }} | |
| run: | | |
| set -euo pipefail | |
| if [[ "${GITHUB_EVENT_NAME}" == "workflow_dispatch" \ | |
| && "${PUBLISH_REQUESTED:-false}" != "true" ]]; then | |
| exit 0 | |
| fi | |
| : "${PUSH_CFG:?Set secret PUSH_CFG to base64-encoded exordos.push.yaml content}" | |
| push_cfg_path="${RUNNER_TEMP}/exordos.push.yaml" | |
| printf "%s" "${PUSH_CFG}" | base64 -d > "${push_cfg_path}" | |
| latest_arg=() | |
| if [[ "${GITHUB_REF_TYPE:-}" == "tag" ]]; then | |
| latest_arg=(--latest) | |
| fi | |
| "${EXORDOS_BIN}" push . \ | |
| --exordos-cfg-file "${push_cfg_path}" \ | |
| --element-dir "${ARTIFACTS_PATH}" \ | |
| --force \ | |
| "${latest_arg[@]}" |