Skip to content

fix(buildroot): update buildroot release specific tags #569

fix(buildroot): update buildroot release specific tags

fix(buildroot): update buildroot release specific tags #569

Workflow file for this run

---
# yamllint disable rule:line-length
name: "build"
on: # yamllint disable-line rule:truthy
push:
branches: [master]
concurrency:
group: ${{ github.ref_name }}
cancel-in-progress: false
defaults:
run:
shell: bash
permissions:
contents: read
jobs:
check-docker-files:
name: Check for updated docker files
runs-on: ubuntu-latest
outputs:
changed: ${{ steps.changed-files.outputs.any_changed }}
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Get changed docker files
id: changed-files
uses: tj-actions/changed-files@9426d40962ed5378910ee2e21d5f8c6fcbf2dd96 # v47.0.6
with:
files: docker/**
docker:
name: Build the container
runs-on: ubuntu-latest
needs: check-docker-files
if: ${{ needs.check-docker-files.outputs.changed == 'true' }}
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
permissions:
packages: write # Required to push image to ghcr.io
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6.2.0
with:
flavor: latest=true
tags: |
type=ref,event=branch
type=sha
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
with:
platforms: linux/amd64
context: docker
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
collect:
name: Collect DEVFAMILY and OS combinations
runs-on: ubuntu-latest
needs: docker
if: ${{ !failure() && !cancelled() }}
container:
image: ghcr.io/texasinstruments/processor-sdk-doc:latest
options: --entrypoint /bin/bash
outputs:
build-matrix: "${{ steps.matrix.outputs.matrix }}"
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Create build matrix
id: matrix
run: |
./bin/build_matrix.py
build:
name: Build
runs-on: ubuntu-latest
container:
image: ghcr.io/texasinstruments/processor-sdk-doc:latest
options: --entrypoint /bin/bash
needs: collect
if: ${{ !failure() && !cancelled() }}
strategy:
matrix:
include: "${{ fromJSON(needs.collect.outputs.build-matrix) }}"
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Add directory to safe dir overrides
run: |
git config --global --add safe.directory "$PWD"
- name: Build ${{ matrix.device }}
env:
DEVFAMILY: ${{ matrix.device }}
OS: ${{ matrix.os }}
run: |
make VERSION=${GITHUB_REF_NAME}
- name: Upload artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: ${{ matrix.device }}-${{ matrix.os }}
path: build/
retention-days: 1