From 21a7a2f0f6e6cf79501046f8c502122d1aa6f73a Mon Sep 17 00:00:00 2001 From: Lennart Jern Date: Wed, 24 Jan 2024 15:38:59 +0200 Subject: [PATCH] Add github action --- .github/workflows/osimages.yaml | 36 +++++++++++++++++++++++++++++++ osimages/Makefile | 2 +- osimages/cloudbuild-osimages.yaml | 2 +- 3 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/osimages.yaml diff --git a/.github/workflows/osimages.yaml b/.github/workflows/osimages.yaml new file mode 100644 index 0000000000..753a333ae8 --- /dev/null +++ b/.github/workflows/osimages.yaml @@ -0,0 +1,36 @@ +name: E2E node images + +on: + pull_request: + branches: [main] + paths-ignore: + - '**/*.md' + - 'docs/**' + - '.gitignore' + - 'hack/*.sh' + - 'LICENSE' + - 'SECURITY_CONTACTS' + - 'OWNERS' + +permissions: {} + +jobs: + build: + name: Build and upload node images + runs-on: ubuntu-latest + + permissions: + contents: read + + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + + - name: Build images + run: make -C osimages -j2 ACCELERATOR=none \ + osimage-flatcar-1.27.2 \ + osimage-flatcar-1.28.2 \ + osimage-ubuntu-2204-1.28.2 \ + osimage-ubuntu-2204-1.27.2 + + - name: Upload images + run: make -C osimages osimage-upload diff --git a/osimages/Makefile b/osimages/Makefile index 27193a041b..94e0e7847c 100644 --- a/osimages/Makefile +++ b/osimages/Makefile @@ -67,7 +67,7 @@ osimage-%: FORCE .PHONY: FORCE FORCE: -.PHONY: osimage-upload: +.PHONY: osimage-upload osimage-upload: ls $(OSIMAGE_DIR) gsutil cp $(OSIMAGE_DIR)/* gs://$(STAGING_BUCKET)/test diff --git a/osimages/cloudbuild-osimages.yaml b/osimages/cloudbuild-osimages.yaml index b3a49a074e..5087e25bf9 100644 --- a/osimages/cloudbuild-osimages.yaml +++ b/osimages/cloudbuild-osimages.yaml @@ -8,7 +8,7 @@ steps: script: | apk add --update bash git make cd ./osimages - make -j2 ACCELERATOR=none \ + make -j2 ACCELERATOR=kvm \ osimage-flatcar-1.27.2 \ osimage-flatcar-1.28.2 \ osimage-ubuntu-2204-1.28.2 \