Skip to content

Commit

Permalink
Merged with upstream.
Browse files Browse the repository at this point in the history
  • Loading branch information
goeland86 committed Jan 8, 2024
2 parents 9e3693a + a8aad31 commit 635283d
Show file tree
Hide file tree
Showing 278 changed files with 21,249 additions and 21,516 deletions.
21 changes: 21 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Set update schedule for GitHub Actions

version: 2
updates:
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
# Check for updates to GitHub Actions every week
interval: 'weekly'

- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'weekly'
allow:
# Ignore major updates to all dependencies. We're using old versions of some packages that are incompatible with newer versions of other packages.
- dependency-name: '*'
update-type: 'semver:non-major'
dependency-type: 'direct'
assignees:
- 'meteyou'
6 changes: 3 additions & 3 deletions .github/workflows/auto-analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@ jobs:
auto-analyze:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}

- name: Check package.json was changed
id: changed-file-package-json
uses: tj-actions/changed-files@v23
uses: tj-actions/changed-files@v41
with:
sha: ${{ github.event.pull_request.head.sha }}

- name: Install node
uses: actions/setup-node@v3
if: contains(steps.changed-file-package-json.outputs.modified_files, 'package.json')
with:
node-version: '16'
node-version: 20
cache: 'npm'

- uses: preactjs/compressed-size-action@v2
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Fetch repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install node
uses: actions/setup-node@v3
with:
node-version: '16'
node-version: 20

- name: Install dependencies
run: npm ci
Expand All @@ -39,7 +39,7 @@ jobs:
- name: Copy output
run: cp ${{ github.workspace }}/dist/mainsail.zip mainsail-latest.zip

- uses: actions/upload-artifact@v2.2.4
- uses: actions/upload-artifact@v3
with:
name: mainsail-latest.zip
path: mainsail-latest.zip
2 changes: 1 addition & 1 deletion .github/workflows/build_size_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
if: contains(github.event.pull_request.labels.*.name, 'analyze')
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: preactjs/compressed-size-action@v2
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/check-pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Check PR title

on:
pull_request_target:
types:
- opened
- reopened
- edited
- synchronize

jobs:
lint:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
types: |
fix
feat
perf
refactor
style
locale
docs
test
chore
build
ci
revert
requireScope: false
ignoreLabels: |
bot
ignore-semantic-pull-request
10 changes: 5 additions & 5 deletions .github/workflows/check_locale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@ jobs:
run: sudo apt install -y jq

- name: Fetch repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}

- name: Install node
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 20

- name: Install dependencies
run: npm ci

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v23
uses: tj-actions/changed-files@v41
with:
sha: ${{ github.event.pull_request.head.sha }}
files: 'src/locales/*.json'
Expand All @@ -43,10 +43,10 @@ jobs:
npm run i18n-extract -- --languageFiles=src/locales/${file##*/} --output=i18n-extract/${file##*/}
MISSING=$(cat i18n-extract/${file##*/} | jq '.missingKeys | length')
UNUSED=$(cat i18n-extract/${file##*/} | jq '.unusedKeys | length')
echo "::set-output name=$file::|${file##*/}|${MISSING}|${UNUSED}|"
echo "$file=|${file##*/}|${MISSING}|${UNUSED}|" >> $GITHUB_OUTPUT
done
- name: Comment PR
uses: thollander/actions-comment-pull-request@v1
uses: thollander/actions-comment-pull-request@v2
with:
message: |
Language file analysis report:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/code_style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,22 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Fetch repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Install node
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 20

- name: Install dependencies
run: npm ci

- name: Run linters
uses: wearerequired/lint-action@v1
uses: wearerequired/lint-action@v2
with:
eslint: true
prettier: true
eslint_dir: src
eslint_extensions: ts,vue
eslint_extensions: ts,vue,json
2 changes: 1 addition & 1 deletion .github/workflows/label-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ jobs:
action:
runs-on: ubuntu-latest
steps:
- uses: dessant/label-actions@v2
- uses: dessant/label-actions@v3
25 changes: 15 additions & 10 deletions .github/workflows/publish_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ name: Create and publish a Docker image

on:
push:
branches: ['master', 'develop']
branches:
- 'develop'
tags:
- '*'
- 'v*'
pull_request:
branches:
- '*'
Expand All @@ -22,32 +23,36 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Log in to the Container registry
uses: docker/login-action@v1
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/master' }}
type=edge,branch=develop
type=ref,event=tag
type=semver,pattern=v{{major}}
type=semver,pattern=v{{major}}.{{minor}}
type=semver,pattern=v{{major}}.{{minor}}.{{patch}}
type=sha
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Build and push Docker image
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
push: ${{ github.event_name != 'pull_request' }}
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:
push-version-number:
runs-on: ubuntu-latest
steps:
- name: Clone develop repository
uses: actions/checkout@v3
- name: Checkout develop branch
uses: actions/checkout@v4
with:
token: ${{ secrets.PAT }}
ref: 'develop'
Expand Down Expand Up @@ -50,18 +50,19 @@ jobs:

release:
needs: ['update-master-branch']
name: Build and release
runs-on: ubuntu-latest
steps:
- name: Fetch repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: 'master'
fetch-depth: 0

- name: Install node
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20

- name: Install dependencies
run: npm ci
Expand All @@ -80,7 +81,7 @@ jobs:
echo "TAG_NAME=$(git describe --tags $(git rev-list --tags --max-count=1))" >> $GITHUB_OUTPUT
- name: Generate a changelog
uses: orhun/git-cliff-action@v1
uses: orhun/git-cliff-action@v2
id: generate-changelog
with:
config: ./cliff-release.toml
Expand All @@ -92,7 +93,7 @@ jobs:
with:
name: v${{ github.event.inputs.version }}
tag_name: v${{ github.event.inputs.version }}
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.PAT }}
files: ./mainsail.zip
body: ${{ steps.generate-changelog.outputs.content }}

Expand Down Expand Up @@ -129,7 +130,7 @@ jobs:
echo "TAG_NAME=$(git describe --tags $(git rev-list --tags --max-count=1))" >> $GITHUB_OUTPUT
- name: Generate a changelog
uses: orhun/git-cliff-action@v1
uses: orhun/git-cliff-action@v2
id: git-cliff
with:
config: cliff.toml
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ jobs:
# container: cypress/browsers:node16.13.2-chrome97-ff96
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install node
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20

- name: Install dependencies
run: npm ci
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ design
*.log
packages/test
dist
dev-dist
temp
.vuerc
.version
Expand Down
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"semi": false,
"printWidth": 120,
"bracketSameLine": true,
"trailingComma": "es5",
"htmlWhitespaceSensitivity": "ignore",
"overrides": [
{
Expand Down
Loading

0 comments on commit 635283d

Please sign in to comment.