Skip to content

Commit

Permalink
Adding CI stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
garbas committed Dec 1, 2024
1 parent 308281a commit 44613dd
Show file tree
Hide file tree
Showing 3 changed files with 123 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
version: 2
updates:

- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 1
commit-message:
prefix: "chore"
include: "scope"
groups:
all:
patterns:
- "*"

- package-ecosystem: npm
directory: '/'
schedule:
interval: weekly
open-pull-requests-limit: 1
commit-message:
prefix: "chore"
include: "scope"
groups:
all:
patterns:
- "*"
55 changes: 55 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: "CI"

on:
workflow_dispatch:
push:
branches:
- "main"
pull_request:

concurrency:
group: "ci-${{ github.ref_name }}-${{ github.event_name }}-${{ github.event.number || (github.event.pull_request.head.sha || github.sha) }}"
cancel-in-progress: true

env:
FLOX_DISABLE_METRICS: "true"

jobs:

build:
name: "Build"
runs-on: "ubuntu-latest"
timeout-minutes: 30

steps:
- name: "Checkout"
uses: "actions/checkout@v4"
with:
fetch-depth: 0

- name: "Install Flox"
uses: "flox/install-flox-action@main"

- name: "Restore npm cache"
uses: "actions/cache@v4"
with:
path: |
~/.npm
key: "${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}"
restore-keys: |
${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}-
- name: "Install"
uses: "flox/activate-action@main"
with:
command: "npm ci"

- name: "Lint"
uses: "flox/activate-action@main"
with:
command: "npm run lint"

- name: "Build"
uses: "flox/activate-action@main"
with:
command: "npm run compile"
40 changes: 40 additions & 0 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: "Update Flox environment"

on:
workflow_dispatch:
schedule:
- cron: "30 0 * * 1"

env:
FLOX_DISABLE_METRICS: "true"

jobs:

upgrade:
name: "Upgrade Flox environment"
runs-on: "ubuntu-latest"
timeout-minutes: 30

steps:
- name: "Checkout"
uses: "actions/checkout@v4"

- name: "Install flox"
uses: "flox/install-flox-action@main"

- name: "Run upgrade"
run: "flox -vvv upgrade"

- name: "Create Pull Request"
uses: "peter-evans/create-pull-request@v6"
with:
token: "${{ secrets.MANAGED_FLOXBOT_GITHUB_ACCESS_TOKEN_REPO_SCOPE }}"
add-paths: ".flox"
commit-message: "chore: Update Flox environment"
commiter: "FloxBot <[email protected]>"
author: "FloxBot <[email protected]>"
branch: "chore-update-flox-environment"
delete-branch: true
title: "chore: Update Flox environment"
body: "This PR was automatically created by [Update workflow](https://github.com/flox/floxwebsite/actions/workflows/update.yml)."
labels: "team-developer-support"

0 comments on commit 44613dd

Please sign in to comment.