Skip to content

Commit

Permalink
workflows: add MCUBuild docker image
Browse files Browse the repository at this point in the history
Signed-off-by: kostyapenkov <[email protected]>
  • Loading branch information
kostyapenkov committed May 5, 2023
1 parent 423e672 commit c6e8a19
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Release - build and push MCUbuild image

on:
release:
types: [published]

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository_owner }}/mcubuild

jobs:
build-publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push
id: build_push
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM ubuntu:22.04

LABEL org.opencontainers.image.source="https://github.com/foundriesio/dm-ak-nano-mcuxpresso-manifest"
LABEL org.opencontainers.image.description="MCUbuild container"

RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
git \
cmake \
make \
python3 \
python3-pip \
gcc-arm-none-eabi

#RUN python3 -m pip install -U pyocd
RUN python3 -m pip install -U west imgtool requests

0 comments on commit c6e8a19

Please sign in to comment.