Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into xiao_esp32c6_with…
Browse files Browse the repository at this point in the history
…_ble
  • Loading branch information
alexbegoon committed Feb 6, 2025
2 parents c684afc + 64def24 commit 17666bb
Show file tree
Hide file tree
Showing 78 changed files with 816 additions and 708 deletions.
51 changes: 0 additions & 51 deletions .github/workflows/build_docker.yml

This file was deleted.

38 changes: 0 additions & 38 deletions .github/workflows/build_native.yml

This file was deleted.

52 changes: 0 additions & 52 deletions .github/workflows/build_raspbian.yml

This file was deleted.

52 changes: 0 additions & 52 deletions .github/workflows/build_raspbian_armv7l.yml

This file was deleted.

8 changes: 7 additions & 1 deletion .github/workflows/daily_packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ permissions:
packages: write

jobs:
docker-multiarch:
uses: ./.github/workflows/docker_manifest.yml
with:
release_channel: daily
secrets: inherit

package-ppa:
strategy:
fail-fast: false
Expand All @@ -34,7 +40,7 @@ jobs:
package-obs:
uses: ./.github/workflows/package_obs.yml
with:
obs_project: home:meshtastic:daily
obs_project: network:Meshtastic:daily
series: unstable
secrets: inherit

Expand Down
92 changes: 92 additions & 0 deletions .github/workflows/docker_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: Build Docker

# Build Docker image, push untagged (digest-only)

on:
workflow_call:
secrets:
DOCKER_FIRMWARE_TOKEN:
required: false # Only required for push
inputs:
distro:
description: Distro to target
required: true
type: string
# choices: [debian, alpine]
platform:
description: Platform to target
required: true
type: string
runs-on:
description: Runner to use
required: true
type: string
push:
description: Push images to registry
required: false
type: boolean
default: false
outputs:
digest:
description: Digest of built image
value: ${{ jobs.docker-build.outputs.digest }}

permissions:
contents: write
packages: write

jobs:
docker-build:
outputs:
digest: ${{ steps.docker_variant.outputs.digest }}
runs-on: ${{ inputs.runs-on }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}

- name: Get release version string
run: |
echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
id: version

- name: Docker login
if: ${{ inputs.push }}
uses: docker/login-action@v3
with:
username: meshtastic
password: ${{ secrets.DOCKER_FIRMWARE_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Docker setup
uses: docker/setup-buildx-action@v3

- name: Sanitize platform string
id: sanitize_platform
# Replace slashes with underscores
run: echo "cleaned_platform=${{ inputs.platform }}" | sed 's/\//_/g' >> $GITHUB_OUTPUT

- name: Docker tag
id: meta
uses: docker/metadata-action@v5
with:
images: meshtastic/meshtasticd
tags: |
GHA-${{ steps.version.outputs.long }}-${{ inputs.distro }}-${{ steps.sanitize_platform.outputs.cleaned_platform }}
flavor: latest=false

- name: Docker build and push
uses: docker/build-push-action@v6
id: docker_variant
with:
context: .
file: |
${{ contains(inputs.distro, 'debian') && './Dockerfile' || contains(inputs.distro, 'alpine') && './alpine.Dockerfile' }}
push: ${{ inputs.push }}
tags: ${{ steps.meta.outputs.tags }} # Tag is only meant to be consumed by the "manifest" job
platforms: ${{ inputs.platform }}
Loading

0 comments on commit 17666bb

Please sign in to comment.