Skip to content

Updated submodules Wed Oct 9 08:13:44 UTC 2024 #513

Updated submodules Wed Oct 9 08:13:44 UTC 2024

Updated submodules Wed Oct 9 08:13:44 UTC 2024 #513

Workflow file for this run

# based on https://github.com/Arcnor/MiyooCFW/blob/ci/.github/workflows/main.yml
name: Build
# Run on changes (including automated ones from the update job), allow manual triggering from the Actions tab
on: [push, pull_request, workflow_dispatch]
jobs:
# https://github.com/MiyooCFW/buildroot/blob/master/.github/workflows/rootfs.yml
build-image:
uses: MiyooCFW/buildroot/.github/workflows/build.yml@master
with:
submodule: buildroot
docker-uclibc:
continue-on-error: true
needs: build-image
permissions:
contents: read
packages: write
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write
runs-on: ubuntu-22.04
env:
# github.repository as <account>/<repo>
IMAGE_NAME: miyoocfw/toolchain-shared-uclibc
DOCKERHUB_USERNAME: miyoocfw
steps:
- uses: actions/checkout@v4
# download and extract the artifact
- uses: actions/download-artifact@v4
with:
name: SDK (uClibc)
- run: tar -xvf arm-miyoo-linux-uclibcgnueabi_sdk-buildroot.tar.gz
- name: Log into docker hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
# create token at https://hub.docker.com/settings/security
# token needs to have read, write, and delete permissions - read and write only leads to a login error (wtf?)
# set value at https://github.com/MiyooCFW/toolchain/settings/secrets/actions
username: ${{ env.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.IMAGE_NAME }}
tags: |
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile-uclibc
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
docker-musl:
continue-on-error: true
needs: build-image
permissions:
contents: read
packages: write
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write
runs-on: ubuntu-22.04
env:
# github.repository as <account>/<repo>
IMAGE_NAME: miyoocfw/toolchain-shared-musl
DOCKERHUB_USERNAME: miyoocfw
steps:
- uses: actions/checkout@v4
# download and extract the artifact
- uses: actions/download-artifact@v4
with:
name: SDK (musl)
- run: tar -xvf arm-miyoo-linux-musleabi_sdk-buildroot.tar.gz
- name: Log into docker hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
# create token at https://hub.docker.com/settings/security
# token needs to have read, write, and delete permissions - read and write only leads to a login error (wtf?)
# set value at https://github.com/MiyooCFW/toolchain/settings/secrets/actions
username: ${{ env.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.IMAGE_NAME }}
tags: |
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile-musl
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
docker-uclibc-static:
continue-on-error: true
needs: build-image
permissions:
contents: read
packages: write
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write
runs-on: ubuntu-22.04
env:
# github.repository as <account>/<repo>
IMAGE_NAME: miyoocfw/toolchain-static-uclibc
DOCKERHUB_USERNAME: miyoocfw
steps:
- uses: actions/checkout@v4
# download and extract the artifact
- uses: actions/download-artifact@v4
with:
name: SDK (uClibc static)
- run: tar -xvf arm-miyoo-linux-uclibcgnueabi_sdk-buildroot.tar.gz
- name: Log into docker hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
# create token at https://hub.docker.com/settings/security
# token needs to have read, write, and delete permissions - read and write only leads to a login error (wtf?)
# set value at https://github.com/MiyooCFW/toolchain/settings/secrets/actions
username: ${{ env.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.IMAGE_NAME }}
tags: |
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile-uclibc
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
docker-musl-static:
continue-on-error: true
needs: build-image
permissions:
contents: read
packages: write
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write
runs-on: ubuntu-22.04
env:
# github.repository as <account>/<repo>
IMAGE_NAME: miyoocfw/toolchain-static-musl
DOCKERHUB_USERNAME: miyoocfw
steps:
- uses: actions/checkout@v4
# download and extract the artifact
- uses: actions/download-artifact@v4
with:
name: SDK (musl static)
- run: tar -xvf arm-miyoo-linux-musleabi_sdk-buildroot.tar.gz
- name: Log into docker hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
# create token at https://hub.docker.com/settings/security
# token needs to have read, write, and delete permissions - read and write only leads to a login error (wtf?)
# set value at https://github.com/MiyooCFW/toolchain/settings/secrets/actions
username: ${{ env.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.IMAGE_NAME }}
tags: |
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile-musl
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# https://github.com/MiyooCFW/uboot/blob/master/.github/workflows/main.yml
uboot:
needs:
- docker-uclibc
- docker-musl
uses: MiyooCFW/uboot/.github/workflows/main.yml@master
with:
submodule: uboot
# https://github.com/MiyooCFW/kernel/blob/master/.github/workflows/build.yml
kernel:
needs:
- docker-uclibc
- docker-musl
uses: MiyooCFW/kernel/.github/workflows/build.yml@master
with:
submodule: kernel
# https://github.com/MiyooCFW/logo/blob/master/.github/workflows/c-cpp.yml
logo:
needs:
- docker-uclibc
- docker-musl
uses: MiyooCFW/logo/.github/workflows/c-cpp.yml@master
with:
submodule: logo
# https://github.com/MiyooCFW/daemon/blob/master/.github/workflows/c-cpp.yml
daemon:
needs:
- docker-uclibc
- docker-musl
uses: MiyooCFW/daemon/.github/workflows/c-cpp.yml@master
with:
submodule: daemon
# https://github.com/MiyooCFW/miyooctl/blob/master/.github/workflows/build.yml
miyooctl:
needs:
- docker-uclibc
- docker-musl
uses: MiyooCFW/miyooctl/.github/workflows/build.yml@master
with:
submodule: miyooctl
# https://github.com/MiyooCFW/gmenu2x/blob/master/.github/workflows/c-cpp.yml
gmenu2x:
needs:
- docker-uclibc
- docker-musl
uses: MiyooCFW/gmenu2x/.github/workflows/c-cpp.yml@master
with:
submodule: gmenu2x
# repack final images for CI build with git commit-tag
fetch-images:
name: MiyooCFW
needs:
- build-image
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- run: echo "version=$GITHUB_REF_NAME-$(git rev-parse --short HEAD)" | sed 's#/#-#g' >> $GITHUB_OUTPUT
id: version
- run: echo "Version ${{ steps.version.outputs.version }}"
- uses: actions/download-artifact@v4
- run: find .
- uses: actions/upload-artifact@v4
with:
# we are using uClibc for backward compatibility & musl for development releases
name: "MiyooCFW ${{ github.ref_type != 'tag' && 'Dev-build' || '' }} ${{ steps.version.outputs.version }}"
path: "*/*.img"
if-no-files-found: error # 'error', 'warn', 'ignore'; defaults to `warn`
# repack current submodules with git commit-tag
fetch-submodules:
name: MiyooCFW (submodules)
needs:
- uboot
- kernel
- logo
- daemon
- miyooctl
- gmenu2x
- fetch-images # buildroot
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- run: echo "version=$GITHUB_REF_NAME-$(git rev-parse --short HEAD)" | sed 's#/#-#g' >> $GITHUB_OUTPUT
id: version
- run: echo "Version ${{ steps.version.outputs.version }}"
- name: Clean main repo files
run: rm -r *
- uses: actions/download-artifact@v4
- name: Remove images and graphs from submodule pack
run: rm -r *image* *graph* *log* MiyooCFW*
- name: Move all left artifacts to "submodules" dir
run: |
shopt -s extglob
mkdir submodules && mv !(submodules|*/) submodules/
- name: List uploaded files
run: find .
- uses: actions/upload-artifact@v4
with:
name: "MiyooCFW-submodules ${{ steps.version.outputs.version }}"
path: submodules
if-no-files-found: error # 'error', 'warn', 'ignore'; defaults to `warn`
# delete recurring artifacts
purge-artifact:
name: Artifacts cleanup
continue-on-error: true
needs:
- fetch-images
- fetch-submodules
runs-on: ubuntu-20.04
steps:
- uses: geekyeggo/delete-artifact@v5
with:
name: "!MiyooCFW*"