Deletes upstream github actions

This commit is contained in:
Josh Wright 2024-12-09 17:28:45 -05:00
parent eeacc03b40
commit d2baa7e729
16 changed files with 0 additions and 860 deletions

17
.github/CODEOWNERS vendored
View File

@ -1,17 +0,0 @@
#
# CODEOWNERS for ProxmoxVE
#
# Order is important; the last matching pattern takes the most
# precedence.
# Codeowners for specific folders and files
# Remember ending folders with /
# Set default reviewers
* @community-scripts/Contributor
# All changes in frontend
/frontend/ @community-scripts/Frontend-Dev

View File

@ -1,132 +0,0 @@
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series
of actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].
Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available
at [https://www.contributor-covenant.org/translations][translations].
[homepage]: https://www.contributor-covenant.org
[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations

View File

@ -1,14 +0,0 @@
<div align="center">
<a href="#">
<img src="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/images/logo.png" height="100px" />
</a>
</div>
<h2 align="center">Contributing to Proxmox VE Helper Scripts</h2>
Everybody is invited and welcome to contribute to Proxmox VE Helper Scripts.
- Pull requests submitted against [**main**](https://github.com/community-scripts/ProxmoxVE/tree/main) are meticulously scrutinized, so please do not take it personally if the project maintainer rejects your request. By adhering to the established patterns and conventions throughout the codebase, you greatly increase the likelihood that your changes will get merged into [**main**](https://github.com/community-scripts/ProxmoxVE/tree/main).
- It is important to stress that complaining about a decision after it has been made is not productive behavior for the pull request submitter. It is crucial for all contributors to respect the decision-making process and collaborate effectively towards achieving the best possible outcome for the project.
- The repository will only accept Alpine applications that make use of the Alpine Package Keeper.

View File

@ -1,37 +0,0 @@
title: "[Script request] "
labels: ["enhancement"]
body:
- type: input
attributes:
label: Application Name
description: Enter the application name.
placeholder: "e.g., Home Assistant"
validations:
required: true
- type: input
attributes:
label: Website
description: Official website or github page.
placeholder: "e.g., https://www.home-assistant.io/"
validations:
required: true
- type: textarea
attributes:
label: Description
description: Explain what the application does and why it should be added to Proxmox VE Helper-Scripts.
placeholder: "e.g., Home Assistant is a popular open-source platform that brings all your smart home devices together in one place. Adding it to Proxmox VE Helper-Scripts would make setup and management on Proxmox easy, letting users quickly get a powerful, self-hosted smart home system up and running."
validations:
required: true
- type: checkboxes
attributes:
label: Due Diligence
options:
- label: "I have searched existing [scripts](https://community-scripts.github.io/Proxmox/scripts) and found no duplicates."
required: true
- label: "I have searched existing [discussions](https://github.com/community-scripts/ProxmoxVE/discussions?discussions_q=) and found no duplicate requests."
required: true
- label: "This is not a game-related request."
required: true
- type: markdown
attributes:
value: "Thanks for submitting your request! The team will review it and reach out if we need more information."

1
.github/FUNDING.yml vendored
View File

@ -1 +0,0 @@
ko_fi: community_scripts

View File

@ -1,71 +0,0 @@
name: "🐞 Script Issue Report"
description: Report a specific issue with a script. For other inquiries, please use the Discussions section.
body:
- type: markdown
attributes:
value: |
**IMPORTANT:** Failure to comply with the following guidelines may result in immediate closure.
- Prior to submitting, kindly search the closed issues to check if the problem you are reporting has already been addressed and resolved. If you come across a closed issue that pertains to your problem, please leave a comment on that issue instead of creating a new one.
- If the default Linux distribution is not adhered to, script support will be discontinued.
- When encountering the error message `[ERROR] in line 23: exit code *: while executing command "$@" > /dev/null 2>&1`, make sure to run the script in verbose mode to accurately determine the underlying issue.
- For suggestions, questions, or feature/script requests, please use the [Discussions section.](https://github.com/community-scripts/ProxmoxVE/discussions)
- type: input
id: guidelines
attributes:
label: Please verify that you have read and understood the guidelines.
placeholder: "yes"
validations:
required: true
- type: textarea
id: bug
attributes:
label: A clear and concise description of the issue.
validations:
required: true
- type: checkboxes
validations:
required: true
attributes:
label: What settings are you currently utilizing?
options:
- label: Default Settings
- label: Advanced Settings
- type: markdown
attributes:
value: "If using Advanced Settings, please try Default Settings before creating an issue."
- type: dropdown
id: distribution
attributes:
label: Which Linux distribution are you employing?
options:
-
- Alpine
- Debian 11
- Debian 12
- Ubuntu 20.04
- Ubuntu 22.04
- Ubuntu 24.04
validations:
required: true
- type: textarea
id: screenshot
attributes:
label: If relevant, including screenshots or a code block can be helpful in clarifying the issue.
placeholder: "Code blocks begin and conclude by enclosing the code with three backticks (```) above and below it."
validations:
required: false
- type: textarea
id: reproduce
attributes:
label: Please provide detailed steps to reproduce the issue.
placeholder: "First do this, then this ..."
validations:
required: false

View File

@ -1,11 +0,0 @@
blank_issues_enabled: false
contact_links:
- name: 🤔 Questions and Help
url: https://github.com/community-scripts/ProxmoxVE/discussions
about: For suggestions or questions, please use the Discussions section.
- name: 🌟 Feature request
url: https://github.com/community-scripts/ProxmoxVE/discussions/new?category=request-script
about: For feature/script requests, please use the Discussions section.
- name: 💻 Discord
url: https://discord.gg/UHrpNWGwkH
about: Join our Discord server to chat with other users in the Proxmox Helper Scripts community.

View File

@ -1,75 +0,0 @@
name: "🌐 Website Issue Report"
description: Report an issue, an optimization request or an documentation issue specifically related to the website.
labels: "website"
body:
- type: markdown
attributes:
value: |
**IMPORTANT:** Failure to comply with the following guidelines may result in immediate closure.
- Prior to submitting, kindly search the closed issues to check if the problem you are reporting has already been addressed and resolved. If you come across a closed issue that pertains to your problem, please leave a comment on that issue instead of creating a new one.
- If the problem is related to a bug in the website, kindly check for browser compatibility and ensure the issue occurs in multiple browsers before submitting.
- For suggestions, questions, or feature requests, please use the [Discussions section.](https://github.com/community-scripts/ProxmoxVE/discussions)
- type: input
id: guidelines
attributes:
label: Please verify that you have read and understood the guidelines.
placeholder: 'yes'
validations:
required: true
- type: dropdown
id: issue_type
validations:
required: true
attributes:
label: What type of issue is this?
options:
-
- Bug
- Optimization
- Documentation
- Other
- type: textarea
id: bug_description
attributes:
label: A clear and concise description of the issue.
validations:
required: true
- type: dropdown
id: browser
validations:
required: true
attributes:
label: Which browser are you using?
options:
-
- Chrome
- Firefox
- Safari
- Edge
- Other
- type: markdown
attributes:
value: |
**If the issue is browser-related**, please provide information on the version and platform (Windows, MacOS, Linux, etc.).
- type: textarea
id: screenshot
attributes:
label: If relevant, including screenshots or a code block can be helpful in clarifying the issue.
placeholder: "Code blocks begin and conclude by enclosing the code with three backticks (```) above and below it."
validations:
required: false
- type: textarea
id: reproduce
attributes:
label: Please provide detailed steps to reproduce the issue.
placeholder: "First do this, then this ..."
validations:
required: false

View File

@ -1,64 +0,0 @@
{
"breaking change": [
{
"fileStatus": "renamed",
"includeGlobs": ["ct/**", "install/**", "misc/**", "turnkey/**", "vm/**"],
"excludeGlobs": []
},
{
"fileStatus": "removed",
"includeGlobs": ["ct/**", "install/**", "misc/**", "turnkey/**", "vm/**"],
"excludeGlobs": []
}
],
"new script": [
{
"fileStatus": "added",
"includeGlobs": ["ct/**", "install/**", "misc/**", "turnkey/**", "vm/**"],
"excludeGlobs": []
}
],
"update script": [
{
"fileStatus": "modified",
"includeGlobs": ["ct/**", "install/**", "misc/**", "turnkey/**", "vm/**"],
"excludeGlobs": ["misc/build.func", "misc/install.func"]
}
],
"delete script": [
{
"fileStatus": "removed",
"includeGlobs": ["ct/**", "install/**", "misc/**", "turnkey/**", "vm/**"],
"excludeGlobs": []
}
],
"rename script": [
{
"fileStatus": "renamed",
"includeGlobs": ["ct/**", "install/**", "misc/**", "turnkey/**", "vm/**"],
"excludeGlobs": []
}
],
"website": [
{
"fileStatus": null,
"includeGlobs": ["frontend/**", "json/**"],
"excludeGlobs": []
}
],
"maintenance": [
{
"fileStatus": null,
"includeGlobs": ["*.md", ".github/**"],
"excludeGlobs": []
}
],
"high risk": [
{
"fileStatus": null,
"includeGlobs": ["misc/build.func", "misc/install.func"],
"excludeGlobs": []
}
]
}

View File

@ -1,30 +0,0 @@
[
{
"title": "💥 Breaking Changes",
"labels": ["breaking change"]
},
{
"title": "✨ New Scripts",
"labels": ["new script"]
},
{
"title": "🚀 Updated Scripts",
"labels": ["update script"]
},
{
"title": "🌐 Website",
"labels": ["website"]
},
{
"title": "🐞 Bug Fixes",
"labels": ["bug fix"]
},
{
"title": "🧰 Maintenance",
"labels": ["maintenance"]
},
{
"title": "❔ Unlabelled",
"labels": []
}
]

View File

@ -1,54 +0,0 @@
name: Check Shell Scripts
on:
pull_request:
paths:
- '**/*.sh' # Führt den Check nur für Shell-Skripte aus
jobs:
check-scripts:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Check `source` Line in Scripts
shell: bash
run: |
set -e
ERROR_COUNT=0
FILES=$(find . -name "*.sh")
for FILE in $FILES; do
# Check for exact match of the source line in line 2
if [[ $(sed -n '2p' "$FILE") =~ ^source[[:space:]]+<(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) ]]; then
echo "Check passed for: $FILE"
else
echo "Error in $FILE: Line 2 must be exactly 'source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)' if a source line is used."
ERROR_COUNT=$((ERROR_COUNT + 1))
fi
# Check for shebang line at the top
if [[ $(head -n 1 "$FILE") != "#!/usr/bin/env bash" ]]; then
echo "Error in $FILE: The first line must be '#!/usr/bin/env bash'."
ERROR_COUNT=$((ERROR_COUNT + 1))
fi
# Check for executable permissions
if [[ ! -x "$FILE" ]]; then
echo "Warning in $FILE: This script is not executable. Consider running 'chmod +x $FILE'."
fi
# Check for empty lines at the beginning of the script
if [[ $(head -n 10 "$FILE" | grep -c '^$') -gt 0 ]]; then
echo "Warning in $FILE: There are empty lines at the beginning of the script. Consider removing them."
fi
done
if [[ "$ERROR_COUNT" -gt 0 ]]; then
echo "$ERROR_COUNT script(s) failed validation."
exit 1
else
echo "All scripts passed."
fi

View File

@ -1,31 +0,0 @@
> [!NOTE]
> We are meticulous when it comes to merging code into the main branch, so please understand that we may reject pull requests that do not meet the project's standards. It's never personal. Also, game-related scripts have a lower chance of being merged.
## Description
Provide a summary of the changes made and/or reference the issue being addressed.
Fixes # (issue)
## Type of change
Please check the relevant option(s):
- [ ] Bug fix (non-breaking change that resolves an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (a fix or feature that would cause existing functionality to change unexpectedly)
- [ ] New script (a fully functional and thoroughly tested script or set of scripts.)
## Prerequisites
The following efforts must be made for the PR to be considered. Please check when completed:
- [ ] Self-review performed (I have reviewed my code, ensuring it follows established patterns and conventions)
- [ ] Testing performed (I have tested my changes, ensuring everything works as expected)
- [ ] Documentation updated (I have updated any relevant documentation)
## Additional Information (optional)
Provide any additional context or screenshots about the feature or fix here.
## Related Pull Requests / Discussions
If there are other pull requests or discussions related to this change, please link them here:
- Related PR #

View File

@ -1,62 +0,0 @@
name: Auto Label Pull Requests
on:
pull_request_target:
branches: ["main"]
types: [opened, synchronize, reopened, edited]
jobs:
autolabeler:
runs-on: ubuntu-latest
permissions:
pull-requests: write
env:
CONFIG_PATH: .github/autolabeler-config.json
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install minimatch
run: npm install minimatch
- name: Label PR based on config rules
uses: actions/github-script@v7
with:
script: |
const fs = require('fs').promises;
const path = require('path');
const { minimatch } = require('minimatch');
const configPath = path.resolve(process.env.CONFIG_PATH);
const fileContent = await fs.readFile(configPath, 'utf-8');
const autolabelerConfig = JSON.parse(fileContent);
const prNumber = context.payload.pull_request.number;
const prListFilesResponse = await github.rest.pulls.listFiles({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: prNumber,
});
const prFiles = prListFilesResponse.data;
for (const [label, rules] of Object.entries(autolabelerConfig)) {
const shouldAddLabel = prFiles.some((prFile) => {
return rules.some((rule) => {
const isFileStatusMatch = rule.fileStatus ? rule.fileStatus === prFile.status : true;
const isIncludeGlobMatch = rule.includeGlobs.some((glob) => minimatch(prFile.filename, glob));
const isExcludeGlobMatch = rule.excludeGlobs.some((glob) => minimatch(prFile.filename, glob));
return isFileStatusMatch && isIncludeGlobMatch && !isExcludeGlobMatch;
});
});
if (shouldAddLabel) {
console.log(`Adding label ${label} to PR ${prNumber}`);
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
labels: [label],
});
}
}

View File

@ -1,158 +0,0 @@
name: Create Changelog Pull Request
on:
push:
branches: ["main"]
workflow_dispatch:
jobs:
update-changelog-pull-request:
runs-on: ubuntu-latest
env:
CONFIG_PATH: .github/changelog-pr-config.json
BRANCH_NAME: github-action-update-changelog
AUTOMATED_PR_LABEL: "automated pr"
permissions:
contents: write
pull-requests: write
steps:
- name: Generate a token
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get latest dates in changelog
run: |
# Extract the latest and second latest dates from changelog
DATES=$(grep '^## [0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}' CHANGELOG.md | head -n 2 | awk '{print $2}')
LATEST_DATE=$(echo "$DATES" | sed -n '1p')
SECOND_LATEST_DATE=$(echo "$DATES" | sed -n '2p')
TODAY=$(date -u +%Y-%m-%d)
echo "TODAY=$TODAY" >> $GITHUB_ENV
if [ "$LATEST_DATE" == "$TODAY" ]; then
echo "LATEST_DATE=$SECOND_LATEST_DATE" >> $GITHUB_ENV
else
echo "LATEST_DATE=$LATEST_DATE" >> $GITHUB_ENV
fi
- name: Get categorized pull requests
id: get-categorized-prs
uses: actions/github-script@v7
with:
script: |
const fs = require('fs').promises;
const path = require('path');
const configPath = path.resolve(process.env.CONFIG_PATH);
const fileContent = await fs.readFile(configPath, 'utf-8');
const changelogConfig = JSON.parse(fileContent);
const categorizedPRs = changelogConfig.map((obj) => ({ ...obj, notes: [] }));
const latestDateInChangelog = new Date(process.env.LATEST_DATE);
latestDateInChangelog.setUTCHours(23,59,59,999);
const { data: pulls } = await github.rest.pulls.list({
owner: context.repo.owner,
repo: context.repo.repo,
state: "closed",
sort: "updated",
direction: "desc",
per_page: 100,
});
pulls.filter((pr) =>
pr.merged_at && new Date(pr.merged_at) > latestDateInChangelog
).forEach((pr) => {
const prLabels = pr.labels.map((label) => label.name.toLowerCase());
const prNote = `- ${pr.title} [@${pr.user.login}](https://github.com/${pr.user.login}) ([#${pr.number}](${pr.html_url}))`;
for (const { labels, notes } of categorizedPRs) {
const prHasCategoryLabel = labels.some((label) => prLabels.includes(label));
const isUnlabelledCategory = labels.length === 0;
const prShouldBeExcluded = prLabels.includes(process.env.AUTOMATED_PR_LABEL);
if ((prHasCategoryLabel || isUnlabelledCategory) && !prShouldBeExcluded) {
notes.push(prNote);
break;
}
};
});
return categorizedPRs;
- name: Update CHANGELOG.md
uses: actions/github-script@v7
with:
script: |
const fs = require('fs').promises;
const path = require('path');
const today = process.env.TODAY;
const latestDateInChangelog = process.env.LATEST_DATE;
const changelogPath = path.resolve('CHANGELOG.md');
const categorizedPRs = ${{ steps.get-categorized-prs.outputs.result }};
let newReleaseNotes = `## ${today}\n\n### Changed\n\n`;
for (const { title, notes } of categorizedPRs) {
if (notes.length > 0) {
newReleaseNotes += `### ${title}\n\n${notes.join("\n")}\n\n`;
}
}
const changelogContent = await fs.readFile(changelogPath, 'utf-8');
const changelogIncludesTodaysReleaseNotes = changelogContent.includes(`\n## ${today}`);
// Replace todays release notes or insert release notes above previous release notes
const regex = changelogIncludesTodaysReleaseNotes ?
new RegExp(`## ${today}.*(?=## ${latestDateInChangelog})`, "gs") :
new RegExp(`(?=## ${latestDateInChangelog})`, "gs");
const newChangelogContent = changelogContent.replace(regex, newReleaseNotes)
await fs.writeFile(changelogPath, newChangelogContent);
- name: Check if there are any changes
id: verify-diff
run: |
git diff --quiet . || echo "changed=true" >> $GITHUB_OUTPUT
- name: Commit and push changes to separate branch
if: steps.verify-diff.outputs.changed == 'true'
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add CHANGELOG.md
git commit -m "Update CHANGELOG.md"
git checkout -b $BRANCH_NAME || git checkout $BRANCH_NAME
git push origin $BRANCH_NAME --force
- name: Create pull request if not exists
if: steps.verify-diff.outputs.changed == 'true'
env:
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
run: |
PR_EXISTS=$(gh pr list --head "${BRANCH_NAME}" --json number --jq '.[].number')
if [ -z "$PR_EXISTS" ]; then
gh pr create --title "[Github Action] Update CHANGELOG.md" \
--body "This PR is auto-generated by a Github Action to update the CHANGELOG.md file." \
--head $BRANCH_NAME \
--base main \
--label "$AUTOMATED_PR_LABEL"
fi
- name: Approve pull request
if: steps.verify-diff.outputs.changed == 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
PR_NUMBER=$(gh pr list --head "${BRANCH_NAME}" --json number --jq '.[].number')
if [ -n "$PR_NUMBER" ]; then
gh pr review $PR_NUMBER --approve
fi

View File

@ -1,78 +0,0 @@
# Based on https://github.com/actions/starter-workflows/blob/main/pages/nextjs.yml
name: Frontend CI/CD
on:
push:
branches: ["main"]
paths:
- frontend/**
- json/**
pull_request:
branches: ["main"]
types: [opened, synchronize, reopened, edited]
paths:
- frontend/**
- json/**
workflow_dispatch:
permissions:
contents: read
concurrency:
group: pages-${{ github.ref }}
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend # Set default working directory for all run steps
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
cache: npm
cache-dependency-path: frontend/package-lock.json
- name: Install dependencies
run: npm ci --prefer-offline --legacy-peer-deps
- name: Run tests
run: npm run test
- name: Configure Next.js for pages
uses: actions/configure-pages@v5
with:
static_site_generator: next
- name: Build with Next.js
run: npm run build
- name: Upload artifact
if: github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v3
with:
path: frontend/out
deploy:
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/main'
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

View File

@ -1,25 +0,0 @@
name: Create new release
on:
schedule:
# Runs "At 00:01 every night" (UTC)
- cron: '1 0 * * *'
jobs:
create-new-release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Parse CHANGELOG.md for yesterday's entries and create a new release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
YESTERDAY=$(date -u --date="yesterday" +%Y-%m-%d)
YESTERDAY_CHANGELOG_NOTES=$(awk '/^## '"$YESTERDAY"'/ {f=1; next} f && /^## [0-9]{4}-[0-9]{2}-[0-9]{2}/ {f=0} f && !/^## / {print}' CHANGELOG.md)
if [ -n "$YESTERDAY_CHANGELOG_NOTES" ]; then
gh release create "$YESTERDAY" -t "$YESTERDAY" -n "$YESTERDAY_CHANGELOG_NOTES" --latest
fi