From 65d96cd97a25d5d7f9dd7e759fb0541f28148764 Mon Sep 17 00:00:00 2001 From: Cezar Craciunoiu Date: Thu, 8 Aug 2024 13:29:25 +0300 Subject: [PATCH] refactor!: Remove 'staging/stable' and move to 'main' Signed-off-by: Cezar Craciunoiu --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- .github/dependabot.yml | 6 +++--- .github/workflows/actionlint.yaml | 2 +- .github/workflows/build.yaml | 2 +- .github/workflows/buildenvs.yaml | 8 ++++---- .github/workflows/check-pr.yaml | 2 +- .github/workflows/check-static.yaml | 6 +++--- .github/workflows/chore-expire-action-caches.yml | 6 +++--- .github/workflows/notarization.yaml | 2 +- .../{release-staging.yaml => prerelease.yaml} | 12 ++++++------ .../workflows/{release-stable.yaml => release.yaml} | 6 +++--- .../workflows/{tests-stable.yaml => tests-main.yaml} | 4 ++-- .github/workflows/{tests.yaml => tests-pr.yaml} | 6 +++--- .github/workflows/tools-dockerfile-llb-frontend.yaml | 6 +++--- .github/workflows/tools-go-generate-qemu-device.yaml | 6 +++--- .github/workflows/tools-protoc-gen-go-netconn.yaml | 6 +++--- ...easer-staging.yaml => .goreleaser-prerelease.yaml | 0 .goreleaser-stable.yaml => .goreleaser-release.yaml | 2 +- Makefile | 4 ++-- README.md | 4 ++-- 20 files changed, 46 insertions(+), 46 deletions(-) rename .github/workflows/{release-staging.yaml => prerelease.yaml} (82%) rename .github/workflows/{release-stable.yaml => release.yaml} (94%) rename .github/workflows/{tests-stable.yaml => tests-main.yaml} (99%) rename .github/workflows/{tests.yaml => tests-pr.yaml} (98%) rename .goreleaser-staging.yaml => .goreleaser-prerelease.yaml (100%) rename .goreleaser-stable.yaml => .goreleaser-release.yaml (99%) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 3cf651032..c1548df1e 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -9,7 +9,7 @@ body: Please only use this form to submit problems with building Kraftkit or it's interaction with Unikraft unikernels. This includes unexpected or undefined behavior, stacktraces, critical messages, and things just breaking or exploding. - **Ensure you have tested against the latest changes on `staging` branch before submitting this form.** + **Ensure you have tested against the latest changes on `main` branch before submitting this form.** For questions, concerns or help with running Kraftkit, please check out our additional resources: diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 57c757c79..99cd9a776 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,7 +4,7 @@ updates: - package-ecosystem: gomod directory: / - target-branch: staging + target-branch: main schedule: interval: weekly day: sunday @@ -19,7 +19,7 @@ updates: - nderjung - package-ecosystem: gomod directory: /tools/go-generate-qemu-devices - target-branch: staging + target-branch: main schedule: interval: weekly day: sunday @@ -34,7 +34,7 @@ updates: - nderjung - package-ecosystem: gomod directory: /tools/protoc-gen-go-netconn - target-branch: staging + target-branch: main schedule: interval: weekly day: sunday diff --git a/.github/workflows/actionlint.yaml b/.github/workflows/actionlint.yaml index bae66616a..6bd1e985f 100644 --- a/.github/workflows/actionlint.yaml +++ b/.github/workflows/actionlint.yaml @@ -3,7 +3,7 @@ name: actionlint on: pull_request: types: [opened, synchronize, reopened] - branches: [staging] + branches: [main] paths: - '.github/workflows/**' diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 8022d85fb..002b24397 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -3,7 +3,7 @@ name: build on: pull_request: types: [opened, synchronize, reopened] - branches: [staging] + branches: [main] paths: - '**' - '!.github/**' diff --git a/.github/workflows/buildenvs.yaml b/.github/workflows/buildenvs.yaml index 004ce578c..a657e8698 100644 --- a/.github/workflows/buildenvs.yaml +++ b/.github/workflows/buildenvs.yaml @@ -5,7 +5,7 @@ on: types: [released] pull_request: types: [opened, synchronize, reopened] - branches: [staging] + branches: [main] paths: - 'buildenvs/qemu.Dockerfile' - 'buildenvs/myself.Dockerfile' @@ -123,7 +123,7 @@ jobs: - uses: actions/checkout@v4 if: ${{ steps.check-run.outputs.run == 'true' && github.event_name == 'push' }} with: - ref: stable + ref: main fetch-depth: 0 - uses: actions/checkout@v4 @@ -207,7 +207,7 @@ jobs: - uses: actions/checkout@v4 if: ${{ steps.check-run.outputs.run == 'true' && github.event_name == 'push' }} with: - ref: stable + ref: main fetch-depth: 0 - uses: actions/checkout@v4 @@ -407,7 +407,7 @@ jobs: - uses: actions/checkout@v4 if: ${{ steps.check-run.outputs.run == 'true' && github.event_name == 'push' }} with: - ref: stable + ref: main fetch-depth: 0 - uses: actions/checkout@v4 diff --git a/.github/workflows/check-pr.yaml b/.github/workflows/check-pr.yaml index f8515d10c..8aa60ada2 100644 --- a/.github/workflows/check-pr.yaml +++ b/.github/workflows/check-pr.yaml @@ -3,7 +3,7 @@ name: check/pr on: pull_request: types: [opened, synchronize, reopened] - branches: [staging] + branches: [main] jobs: commits: diff --git a/.github/workflows/check-static.yaml b/.github/workflows/check-static.yaml index 16d775f3a..6a7d98caa 100644 --- a/.github/workflows/check-static.yaml +++ b/.github/workflows/check-static.yaml @@ -1,11 +1,11 @@ name: check/static on: - push: - branches: [stable] + release: + types: [released] pull_request: types: [opened, synchronize, reopened] - branches: [staging] + branches: [main] paths: - '**' - '!.github/**' diff --git a/.github/workflows/chore-expire-action-caches.yml b/.github/workflows/chore-expire-action-caches.yml index 83a9abbe1..d49cd9b46 100644 --- a/.github/workflows/chore-expire-action-caches.yml +++ b/.github/workflows/chore-expire-action-caches.yml @@ -1,8 +1,8 @@ name: chore/expire-action-caches on: - push: - branches: [stable] + release: + types: [released] jobs: @@ -34,7 +34,7 @@ jobs: }) .then(caches => { for (const cache of caches) { - if (cache.ref == 'refs/heads/staging') { + if (cache.ref == 'refs/heads/main') { const cachePrefix = cache.key.slice(0, -cacheSuffixLen) if (cachePrefixes.has(cachePrefix)) { const seen = cachePrefixes.get(cachePrefix) diff --git a/.github/workflows/notarization.yaml b/.github/workflows/notarization.yaml index 5631d273d..f62e36378 100644 --- a/.github/workflows/notarization.yaml +++ b/.github/workflows/notarization.yaml @@ -117,7 +117,7 @@ jobs: uses: actions/checkout@v4 with: repository: unikraft/homebrew-cli - ref: staging + ref: main path: homebrew-kraftkit - name: Update Brew Formula diff --git a/.github/workflows/release-staging.yaml b/.github/workflows/prerelease.yaml similarity index 82% rename from .github/workflows/release-staging.yaml rename to .github/workflows/prerelease.yaml index 74c884c23..2b97302d9 100644 --- a/.github/workflows/release-staging.yaml +++ b/.github/workflows/prerelease.yaml @@ -1,8 +1,8 @@ -name: release/staging +name: prerelease on: push: - branches: [staging] + branches: [main] permissions: contents: write @@ -23,10 +23,10 @@ jobs: run: | git config --global --add safe.directory /__w/kraftkit/kraftkit git fetch --force --tags - + - name: Generate GoReleaser configuration run: | - ytt -f .goreleaser-staging.yaml > goreleaser-staging.yaml + ytt -f .goreleaser-prerelease.yaml > goreleaser-prerelease.yaml - name: Run GoReleaser run: | @@ -36,10 +36,10 @@ jobs: git tag -a "$(git describe)" -m "Pre-release: $(git describe)" echo "$GOOGLE_APPLICATION_JSON" > /tmp/gs.json goreleaser build \ - --config goreleaser-staging.yaml \ + --config goreleaser-prerelease.yaml \ --skip-validate goreleaser release \ - --config goreleaser-staging.yaml \ + --config goreleaser-prerelease.yaml \ --rm-dist \ --skip-validate env: diff --git a/.github/workflows/release-stable.yaml b/.github/workflows/release.yaml similarity index 94% rename from .github/workflows/release-stable.yaml rename to .github/workflows/release.yaml index 0bbab14a3..55ef61522 100644 --- a/.github/workflows/release-stable.yaml +++ b/.github/workflows/release.yaml @@ -1,4 +1,4 @@ -name: release/stable +name: release on: push: @@ -33,7 +33,7 @@ jobs: - name: Generate GoReleaser configuration run: | - ytt -f .goreleaser-stable.yaml > goreleaser-stable.yaml + ytt -f .goreleaser-release.yaml > goreleaser-release.yaml - name: Write cosign key to file run: | @@ -49,7 +49,7 @@ jobs: export GORELEASER_CURRENT_TAG="${{ github.ref_name }}" echo "$GOOGLE_APPLICATION_JSON" > /tmp/gs.json goreleaser release \ - --config goreleaser-stable.yaml \ + --config goreleaser-release.yaml \ --clean \ --skip-validate fury push "$(ls ./dist/kraftkit_*_linux_amd64.deb)" --quiet --account "$FURY_USER" --api-token "$FURY_TOKEN" diff --git a/.github/workflows/tests-stable.yaml b/.github/workflows/tests-main.yaml similarity index 99% rename from .github/workflows/tests-stable.yaml rename to .github/workflows/tests-main.yaml index b086a6487..abc29e165 100644 --- a/.github/workflows/tests-stable.yaml +++ b/.github/workflows/tests-main.yaml @@ -1,8 +1,8 @@ -name: tests/stable +name: tests/main on: push: - branches: [stable] + branches: [main] jobs: unit: diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests-pr.yaml similarity index 98% rename from .github/workflows/tests.yaml rename to .github/workflows/tests-pr.yaml index 0cc8070db..89ac1f542 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests-pr.yaml @@ -1,13 +1,13 @@ -name: tests +name: tests/pr on: pull_request: types: [opened, synchronize, reopened] - branches: [staging] + branches: [main] paths: - '**' - '!.github/**' - - '.github/workflows/tests.yaml' + - '.github/workflows/tests-pr.yaml' jobs: unit: diff --git a/.github/workflows/tools-dockerfile-llb-frontend.yaml b/.github/workflows/tools-dockerfile-llb-frontend.yaml index 32ae235d3..92e6ac899 100644 --- a/.github/workflows/tools-dockerfile-llb-frontend.yaml +++ b/.github/workflows/tools-dockerfile-llb-frontend.yaml @@ -1,11 +1,11 @@ name: tools/dockerfile-llb-frontend on: - push: - branches: [stable] + release: + types: [released] pull_request: types: [opened, synchronize, reopened] - branches: [staging] + branches: [main] paths: - 'tools/dockerfile-llb-frontend/**' - '.github/workflows/dockerfile-llb-frontend.yaml' diff --git a/.github/workflows/tools-go-generate-qemu-device.yaml b/.github/workflows/tools-go-generate-qemu-device.yaml index 16efef9f6..f157830b3 100644 --- a/.github/workflows/tools-go-generate-qemu-device.yaml +++ b/.github/workflows/tools-go-generate-qemu-device.yaml @@ -1,11 +1,11 @@ name: tools/go-generate-qemu-device on: - push: - branches: [stable] + release: + types: [released] pull_request: types: [opened, synchronize, reopened] - branches: [staging] + branches: [main] paths: - 'tools/go-generate-qemu-devices/**' - '.github/workflows/gobuild-qemu-devices.yaml' diff --git a/.github/workflows/tools-protoc-gen-go-netconn.yaml b/.github/workflows/tools-protoc-gen-go-netconn.yaml index b985a7fb0..4cc6d213d 100644 --- a/.github/workflows/tools-protoc-gen-go-netconn.yaml +++ b/.github/workflows/tools-protoc-gen-go-netconn.yaml @@ -1,11 +1,11 @@ name: tools/protoc-gen-go-netconn on: - push: - branches: [stable] + release: + types: [released] pull_request: types: [opened, synchronize, reopened] - branches: [staging] + branches: [main] paths: - 'tools/protoc-gen-go-netconn/**' - '.github/workflows/gobuild-protoc.yaml' diff --git a/.goreleaser-staging.yaml b/.goreleaser-prerelease.yaml similarity index 100% rename from .goreleaser-staging.yaml rename to .goreleaser-prerelease.yaml diff --git a/.goreleaser-stable.yaml b/.goreleaser-release.yaml similarity index 99% rename from .goreleaser-stable.yaml rename to .goreleaser-release.yaml index 1b236db8d..7ae0a4170 100644 --- a/.goreleaser-stable.yaml +++ b/.goreleaser-release.yaml @@ -44,7 +44,7 @@ release: header: | ## KraftKit {{ .Tag }} ({{ .Date }}) - This is a stable release of kraftkit. + Release of kraftkit. name_template: 'v{{ .Version }}' signs: diff --git a/Makefile b/Makefile index e5ca1a4b5..9083b7089 100644 --- a/Makefile +++ b/Makefile @@ -126,12 +126,12 @@ endif all: help .PHONY: build -build: CHANNEL ?= staging +build: CHANNEL ?= prerelease build: $(WORKDIR)/goreleaser-$(CHANNEL).yaml build: ## Build all KraftKit binary artifacts. $(GORELEASER) build --config $(WORKDIR)/goreleaser-$(CHANNEL).yaml --clean --skip-validate -$(WORKDIR)/goreleaser-$(CHANNEL).yaml: CHANNEL ?= staging +$(WORKDIR)/goreleaser-$(CHANNEL).yaml: CHANNEL ?= prerelease $(WORKDIR)/goreleaser-$(CHANNEL).yaml: $(YTT) -f .goreleaser-$(CHANNEL).yaml > goreleaser-$(CHANNEL).yaml diff --git a/README.md b/README.md index ab5ae83a3..f2cda914a 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,7 @@ Find [more examples and applications in our community catalog](https://github.co ## Use in GitHub Actions -KraftKit can be used to automatically build your application into a unikernel in a GitHub Actions workflow, simply `use` `unikraft/kraftkit@staging`. +KraftKit can be used to automatically build your application into a unikernel in a GitHub Actions workflow, simply `use` `unikraft/kraftkit@main`. In the following example, a repository that has been initialized with a top-level `Kraftfile` that contains a target for qemu/x86_64 will be built every time a PR is opened, synchronized or re-opened: @@ -103,7 +103,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: unikraft/kraftkit@staging + - uses: unikraft/kraftkit@main with: workdir: . kraftfile: Kraftfile