Skip to content

Commit

Permalink
Add FIPS and strict patches
Browse files Browse the repository at this point in the history
  • Loading branch information
neoaggelos committed Oct 31, 2023
1 parent 8cde17d commit af95f2c
Show file tree
Hide file tree
Showing 8 changed files with 1,381 additions and 4 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/check-flavors.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build custom MicroK8s flavors

on:
pull_request:
branches: [master]
push:
branches: [master]

jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
patch: [strict, fips]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Apply patches
run: |
git config --global user.email microk8s@canonical.com
git config --global user.name microk8s-bot
git am build-scripts/patches/${{ matrix.patch }}/*.patch
- name: Install lxd
run: |
sudo lxd init --auto
sudo usermod --append --groups lxd $USER
sg lxd -c 'lxc version'
- name: Install snapcraft
run: |
sudo snap install snapcraft --classic
- name: Build snap
run: |
sg lxd -c 'snapcraft --use-lxd'
sudo mv microk8s*.snap microk8s.snap
- name: Uploading snap
uses: actions/upload-artifact@v3
with:
name: microk8s-${{ matrix.patch }}.snap
path: microk8s.snap
28 changes: 28 additions & 0 deletions .github/workflows/update-flavors.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Update custom MicroK8s flavor branches

on:
push:
branches: [master]

jobs:
update:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- { patch: fips, branch: autoupdate/fips }
- { patch: strict, branch: autoupdate/strict }
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Switch to branch
run: |
git checkout -b ${{ matrix.branch }}
- name: Apply patches
run: |
git config --global user.email microk8s@canonical.com
git config --global user.name microk8s-bot
git am build-scripts/patches/${{ matrix.patch }}/*.patch
- name: Push branch
run: |
git push origin --force ${{ matrix.branch }}
Loading

0 comments on commit af95f2c

Please sign in to comment.