mirror of
https://github.com/meshtastic/firmware.git
synced 2025-02-01 02:09:57 +00:00
Docker: tag intermediate containers (#5910)
This commit is contained in:
parent
7fb22cf678
commit
01892cbd1e
21
.github/workflows/docker_build.yml
vendored
21
.github/workflows/docker_build.yml
vendored
@ -48,6 +48,11 @@ jobs:
|
|||||||
ref: ${{github.event.pull_request.head.ref}}
|
ref: ${{github.event.pull_request.head.ref}}
|
||||||
repository: ${{github.event.pull_request.head.repo.full_name}}
|
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
|
- name: Docker login
|
||||||
if: ${{ inputs.push }}
|
if: ${{ inputs.push }}
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
@ -61,6 +66,20 @@ jobs:
|
|||||||
- name: Docker setup
|
- name: Docker setup
|
||||||
uses: docker/setup-buildx-action@v3
|
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
|
- name: Docker build and push
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
id: docker_variant
|
id: docker_variant
|
||||||
@ -69,5 +88,5 @@ jobs:
|
|||||||
file: |
|
file: |
|
||||||
${{ contains(inputs.distro, 'debian') && './Dockerfile' || contains(inputs.distro, 'alpine') && './alpine.Dockerfile' }}
|
${{ contains(inputs.distro, 'debian') && './Dockerfile' || contains(inputs.distro, 'alpine') && './alpine.Dockerfile' }}
|
||||||
push: ${{ inputs.push }}
|
push: ${{ inputs.push }}
|
||||||
tags: "" # Intentionally empty, push with digest only
|
tags: ${{ steps.meta.outputs.tags }} # Tag is only meant to be consumed by the "manifest" job
|
||||||
platforms: ${{ inputs.platform }}
|
platforms: ${{ inputs.platform }}
|
||||||
|
1
.github/workflows/docker_manifest.yml
vendored
1
.github/workflows/docker_manifest.yml
vendored
@ -145,6 +145,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
images: meshtastic/meshtasticd
|
images: meshtastic/meshtasticd
|
||||||
tags: ${{ steps.tags.outputs.debian }}
|
tags: ${{ steps.tags.outputs.debian }}
|
||||||
|
flavor: latest=false
|
||||||
|
|
||||||
- name: Create Docker manifest (Debian)
|
- name: Create Docker manifest (Debian)
|
||||||
id: manifest_debian
|
id: manifest_debian
|
||||||
|
Loading…
Reference in New Issue
Block a user