Skip to content

Commit

Permalink
misc: test
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkoSagadin committed Jul 5, 2024
1 parent 0bff18f commit a0debd7
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 37 deletions.
88 changes: 52 additions & 36 deletions .github/workflows/build-and-publish-vanilla-zephyr.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: Build and publish a Vanilla Zephyr Docker images

on:
push:
tags:
- "v*"
workflow_call:
inputs:
release_version:
required: true
type: string

env:
REGISTRY: ghcr.io
Expand Down Expand Up @@ -37,41 +39,55 @@ jobs:
username: ${{github.actor}}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata for CI image
id: meta-ci
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-${{ matrix.variant.zephyr_version }}-ci

- name: Extract metadata for Dev image
id: meta-dev
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-${{ matrix.variant.zephyr_version }}-dev
# - name: Extract metadata for CI image
# id: meta-ci
# uses: docker/metadata-action@v5
# with:
# images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-${{ matrix.variant.zephyr_version }}-ci
#
# - name: Extract metadata for Dev image
# id: meta-dev
# uses: docker/metadata-action@v5
# with:
# images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-${{ matrix.variant.zephyr_version }}-dev

- name: Build and push CI image
id: push-ci
uses: docker/build-push-action@v5
with:
file: ./vanilla-zephyr/Dockerfile.ci
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta-ci.outputs.tags }}
labels: ${{ steps.meta-ci.outputs.labels }}
build-args: |
ZEPHYR_VERSION=${{ matrix.variant.zephyr_version }}
MCUBOOT_VERSION=${{ matrix.variant.mcuboot_version }}
- name: Build and push Dev image
- name: Build and push test image
id: push-dev
uses: docker/build-push-action@v5
with:
file: ./vanilla-zephyr/Dockerfile.dev
platforms: linux/amd64,linux/arm64
file: ./Dockerfile
push: true
tags: ${{ steps.meta-dev.outputs.tags }}
labels: ${{ steps.meta-dev.outputs.labels }}
build-args: |
ZEPHYR_VERSION=${{ matrix.variant.zephyr_version }}
MCUBOOT_VERSION=${{ matrix.variant.mcuboot_version }}
BASE_IMAGE=${{ steps.meta-ci.outputs.tags }}
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-${{ matrix.variant.zephyr_version }}-test:${{ inputs.release_version }}
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-${{ matrix.variant.zephyr_version }}-test:latest
# build-args: |
# ZEPHYR_VERSION=${{ matrix.variant.zephyr_version }}
# MCUBOOT_VERSION=${{ matrix.variant.mcuboot_version }}
# BASE_IMAGE=${{ steps.meta-ci.outputs.tags }}

# - name: Build and push CI image
# id: push-ci
# uses: docker/build-push-action@v5
# with:
# file: ./vanilla-zephyr/Dockerfile.ci
# platforms: linux/amd64,linux/arm64
# push: true
# tags: ${{ steps.meta-ci.outputs.tags }}
# labels: ${{ steps.meta-ci.outputs.labels }}
# build-args: |
# ZEPHYR_VERSION=${{ matrix.variant.zephyr_version }}
# MCUBOOT_VERSION=${{ matrix.variant.mcuboot_version }}

# - name: Build and push Dev image
# id: push-dev
# uses: docker/build-push-action@v5
# with:
# file: ./vanilla-zephyr/Dockerfile.dev
# platforms: linux/amd64,linux/arm64
# push: true
# tags: ${{ steps.meta-dev.outputs.tags }}
# labels: ${{ steps.meta-dev.outputs.labels }}
# build-args: |
# ZEPHYR_VERSION=${{ matrix.variant.zephyr_version }}
# MCUBOOT_VERSION=${{ matrix.variant.mcuboot_version }}
# BASE_IMAGE=${{ steps.meta-ci.outputs.tags }}
7 changes: 6 additions & 1 deletion .github/workflows/create-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ env:
jobs:
update-changelog:
runs-on: ubuntu-22.04
# runs-on: self-hosted

steps:
- name: Checkout Repository
Expand Down Expand Up @@ -63,3 +62,9 @@ jobs:
uses: ./.github/workflows/publish-release.yaml
with:
release_version: ${{ inputs.version }}

call-build-publish:
needs: update-changelog
uses: ./.github/workflows/build-and-publish-vanilla-zephyr.yaml
with:
release_version: ${{ inputs.version }}
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM alpine
CMD ["/bin/sh", "-c", "echo 'hello world'"]

0 comments on commit a0debd7

Please sign in to comment.