Skip to content

Commit

Permalink
workflow: init build, test and nightly docker
Browse files Browse the repository at this point in the history
  • Loading branch information
MrMysterius committed Aug 30, 2024
1 parent 951c622 commit e4662f6
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/builds+tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: 'Build and Tests'
on:
push:

jobs:
tests:
name: Build
runs-on: ubuntu-latest

permissions:
id-token: write
contents: read

steps:
- name: Clone repository
uses: actions/checkout@v3

- name: Install Node
uses: actions/setup-node@v4
with:
node-version: '22.x'

- name: PNPM Install
run: 'npm install -g pnpm'

- name: Install Dependencies
run: 'pnpm install --frozen-lockfile'

- name: Run Tests
run: 'pnpm test'

build:
name: Build
runs-on: ubuntu-latest

permissions:
id-token: write
contents: read

steps:
- name: Clone repository
uses: actions/checkout@v3

- name: Install Node
uses: actions/setup-node@v4
with:
node-version: '22.x'

- name: PNPM Install
run: 'npm install -g pnpm'

- name: Install Dependencies
run: 'pnpm install --frozen-lockfile'

- name: Test Build
run: 'pnpm build'
34 changes: 34 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: 'Nightly Build'

on:
schedule:
- cron: '0 0 * * *'


jobs:
nightly:
name: Build Docker Image Nightly
runs-on: ubuntu-20.04

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to Github Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUBPAT_TOKEN }}

- name: Build and Push
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: true
tags: |
ghcr.io/MrMysterius/get-it-done:nightly

0 comments on commit e4662f6

Please sign in to comment.