Skip to content

Commit 44613dd

Browse files
committed
Adding CI stuff
1 parent 308281a commit 44613dd

File tree

3 files changed

+123
-0
lines changed

3 files changed

+123
-0
lines changed

.github/dependabot.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
version: 2
2+
updates:
3+
4+
- package-ecosystem: github-actions
5+
directory: "/"
6+
schedule:
7+
interval: weekly
8+
open-pull-requests-limit: 1
9+
commit-message:
10+
prefix: "chore"
11+
include: "scope"
12+
groups:
13+
all:
14+
patterns:
15+
- "*"
16+
17+
- package-ecosystem: npm
18+
directory: '/'
19+
schedule:
20+
interval: weekly
21+
open-pull-requests-limit: 1
22+
commit-message:
23+
prefix: "chore"
24+
include: "scope"
25+
groups:
26+
all:
27+
patterns:
28+
- "*"

.github/workflows/ci.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: "CI"
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- "main"
8+
pull_request:
9+
10+
concurrency:
11+
group: "ci-${{ github.ref_name }}-${{ github.event_name }}-${{ github.event.number || (github.event.pull_request.head.sha || github.sha) }}"
12+
cancel-in-progress: true
13+
14+
env:
15+
FLOX_DISABLE_METRICS: "true"
16+
17+
jobs:
18+
19+
build:
20+
name: "Build"
21+
runs-on: "ubuntu-latest"
22+
timeout-minutes: 30
23+
24+
steps:
25+
- name: "Checkout"
26+
uses: "actions/checkout@v4"
27+
with:
28+
fetch-depth: 0
29+
30+
- name: "Install Flox"
31+
uses: "flox/install-flox-action@main"
32+
33+
- name: "Restore npm cache"
34+
uses: "actions/cache@v4"
35+
with:
36+
path: |
37+
~/.npm
38+
key: "${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}"
39+
restore-keys: |
40+
${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}-
41+
42+
- name: "Install"
43+
uses: "flox/activate-action@main"
44+
with:
45+
command: "npm ci"
46+
47+
- name: "Lint"
48+
uses: "flox/activate-action@main"
49+
with:
50+
command: "npm run lint"
51+
52+
- name: "Build"
53+
uses: "flox/activate-action@main"
54+
with:
55+
command: "npm run compile"

.github/workflows/update.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: "Update Flox environment"
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "30 0 * * 1"
7+
8+
env:
9+
FLOX_DISABLE_METRICS: "true"
10+
11+
jobs:
12+
13+
upgrade:
14+
name: "Upgrade Flox environment"
15+
runs-on: "ubuntu-latest"
16+
timeout-minutes: 30
17+
18+
steps:
19+
- name: "Checkout"
20+
uses: "actions/checkout@v4"
21+
22+
- name: "Install flox"
23+
uses: "flox/install-flox-action@main"
24+
25+
- name: "Run upgrade"
26+
run: "flox -vvv upgrade"
27+
28+
- name: "Create Pull Request"
29+
uses: "peter-evans/create-pull-request@v6"
30+
with:
31+
token: "${{ secrets.MANAGED_FLOXBOT_GITHUB_ACCESS_TOKEN_REPO_SCOPE }}"
32+
add-paths: ".flox"
33+
commit-message: "chore: Update Flox environment"
34+
commiter: "FloxBot <[email protected]>"
35+
author: "FloxBot <[email protected]>"
36+
branch: "chore-update-flox-environment"
37+
delete-branch: true
38+
title: "chore: Update Flox environment"
39+
body: "This PR was automatically created by [Update workflow](https://github.com/flox/floxwebsite/actions/workflows/update.yml)."
40+
labels: "team-developer-support"

0 commit comments

Comments
 (0)