Skip to content

Commit

Permalink
actions: Add workflow to publish OSTree images
Browse files Browse the repository at this point in the history
Add a GH Actions workflow to publish OSTree images from Yocto builds
into an AWS S3 bucket.

Closes commontorizon/meta-common-torizon#40

Signed-off-by: Leonardo Graboski Veiga <[email protected]>
  • Loading branch information
leograba committed May 8, 2024
1 parent 115b081 commit f12bd2e
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/ostree-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: OSTree Push

on:
workflow_dispatch:
inputs:
machine:
description: "Hardware machine"
required: true
type: choice
options:
- apalis-imx6
- apalis-imx8
- beaglebone-yocto
- beagleplay
- colibri-imx6
- colibri-imx6ull-emmc
- colibri-imx7-emmc
- colibri-imx8x
- genericx86-64
- intel-corei7-64
- nezha-allwinner-d1
- qemuarm64
- qemux86-64
- raspberrypi0-2w-64
- raspberrypi0-wifi
- raspberrypi3-64
- raspberrypi4-64
- verdin-am62
- verdin-imx8mm
- verdin-imx8mp

env:
BUCKET_NAME : "commontorizon"
AWS_REGION : "eu-central-1"
MACHINE : ${{ inputs.machine }}

permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout

jobs:
OSTreePushToS3:
runs-on: ubuntu-latest
steps:
- name: Git clone the repository
uses: actions/checkout@v4
- name: Configure aws credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::184931540836:role/CommonTorizonOstreePush
role-session-name: CommonTorizonOSTreePushSession
aws-region: ${{ env.AWS_REGION }}
# Sync OSTree repo for a given machine to S3 bucket
- name: Sync OSTree repo for ${{ env.MACHINE }} to S3
# TODO: adapt the command to get the build output when Yocto build CI is set
run: |
aws s3 sync ./build/deploy/images/${{ env.MACHINE }} s3://${{ env.BUCKET_NAME }}/${{ env.MACHINE }}

0 comments on commit f12bd2e

Please sign in to comment.