Skip to content

Commit

Permalink
github ci
Browse files Browse the repository at this point in the history
  • Loading branch information
nberlee committed Nov 22, 2023
1 parent fc4cc0e commit 006fb74
Showing 1 changed file with 89 additions and 0 deletions.
89 changes: 89 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Talos Image

on:
push:
branches: [ 'turingrk1', 'release-*' ]
tags:
- "v*"

jobs:
talos-image:
runs-on: buildjet-4vcpu-ubuntu-2204-arm

permissions:
contents: read
packages: write


steps:
- uses: docker/setup-buildx-action@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Checkout
uses: actions/checkout@v4
with:
# need history for `git describe` to work for Talos `Makefile`
fetch-depth: 0
fetch-tags: true

- name: Fetch tags from External Repository
run: |
git remote add upstream https://github.com/siderolabs/talos.git
git fetch upstream -t
- name: Build and push Talos installer image
run: make installer
env:
PUSH: '1'
USERNAME: ${{ github.actor }}
PLATFORM: linux/arm64
PROGRESS: plain
CI_ARGS: "--cache-from=ghcr.io/${{ github.actor }}/installer:cache --cache-to=ghcr.io/${{ github.actor }}/installer:cache"

- name: Build and push Talos imager image
run: make imager
env:
PUSH: '1'
USERNAME: ${{ github.actor }}
PLATFORM: linux/arm64
PROGRESS: plain
CI_ARGS: "--cache-from=ghcr.io/${{ github.actor }}/imager:cache --cache-to=ghcr.io/${{ github.actor }}/imager:cache"

- name: Build an turing-rk1 flashable image
run: make sbc-turing_rk1
env:
USERNAME: ${{ github.actor }}
PLATFORM: linux/arm64
PROGRESS: plain

- uses: actions/upload-artifact@v3
with:
name: image-turing-rk1
path: _out/*.img.xz
if-no-files-found: error

release:
runs-on: ubuntu-22.04
needs: talos-image

permissions:
contents: write
packages: none

if: startsWith(github.ref, 'refs/tags/')

steps:
- uses: actions/download-artifact@v3

- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
fail_on_unmatched_files: true
files: 'image-*/*.img.xz'
generate_release_notes: true

0 comments on commit 006fb74

Please sign in to comment.