Label Sync / Label Sync (push) Failing after 1m7s
E2E / reject-invalid (bad-bgp-asn) (push) Skipped
E2E / reject-invalid (bad-mac-address) (push) Skipped
E2E / reject-invalid (bad-repo-url) (push) Skipped
E2E / reject-invalid (bad-vlan-tag) (push) Skipped
E2E / reject-invalid (duplicate-gateway-addrs) (push) Skipped
E2E / reject-invalid (duplicate-node-names) (push) Skipped
E2E / reject-invalid (gateway-node-collision) (push) Skipped
E2E / reject-invalid (missing-dns-token) (push) Skipped
E2E / reject-invalid (nested-cidr-overlap) (push) Skipped
E2E / reject-invalid (node-addr-outside-cidr) (push) Skipped
E2E / reject-invalid (tunnel-without-dns) (push) Skipped
E2E / accept-valid (selfhosted) (push) Skipped
E2E / reject-invalid (missing-known-hosts) (push) Skipped
E2E / reject-invalid (missing-schematic) (push) Skipped
E2E / reject-invalid (partial-bgp) (push) Skipped
E2E / accept-valid (internal) (push) Skipped
E2E / reject-invalid (missing-external-gateway) (push) Skipped
E2E / reject-invalid (node-uses-gateway-addr) (push) Skipped
E2E / reject-invalid (non-canonical-cidr) (push) Skipped
E2E / accept-valid (private) (push) Skipped
E2E / accept-valid (single-node) (push) Skipped
E2E / reject-invalid (overlapping-cidrs) (push) Skipped
E2E / reject-invalid (reserved-node-name) (push) Skipped
E2E / reject-invalid (tiny-svc-cidr) (push) Skipped
E2E / validator-tests (push) Skipped
E2E / accept-valid (direct) (push) Skipped
E2E / accept-valid (multi-controller) (push) Skipped
E2E / accept-valid (no-webhook) (push) Skipped
E2E / accept-valid (public) (push) Skipped
59 lines
2.0 KiB
YAML
59 lines
2.0 KiB
YAML
---
|
|
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
|
name: "Release"
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: 0 0 1 * *
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
release:
|
|
name: Release
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- name: Get Previous Release Tag and Determine Next Tag
|
|
id: determine-next-tag
|
|
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
result-encoding: string
|
|
script: |
|
|
const { data: releases } = await github.rest.repos.listReleases({
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
per_page: 1,
|
|
});
|
|
|
|
let previousTag = "0.0.0"; // Default if no previous release exists
|
|
if (releases.length > 0) {
|
|
previousTag = releases[0].tag_name;
|
|
}
|
|
|
|
const [previousMajor, previousMinor, previousPatch] = previousTag.split('.').map(Number);
|
|
const currentYear = new Date().getFullYear();
|
|
const currentMonth = new Date().getMonth() + 1; // Months are 0-indexed in JavaScript
|
|
|
|
const nextMajorMinor = `${currentYear}.${currentMonth}`;
|
|
let nextPatch;
|
|
|
|
if (`${previousMajor}.${previousMinor}` === nextMajorMinor) {
|
|
console.log("Month release already exists for the year. Incrementing patch number by 1.");
|
|
nextPatch = previousPatch + 1;
|
|
} else {
|
|
console.log("Month release does not exist for the year. Starting with patch number 0.");
|
|
nextPatch = 0;
|
|
}
|
|
|
|
return `${nextMajorMinor}.${nextPatch}`;
|
|
|
|
- name: Create Release
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
TAG: ${{ steps.determine-next-tag.outputs.result }}
|
|
run: gh release create "$TAG" --repo "$GITHUB_REPOSITORY" --generate-notes
|