diff --git a/.github/workflows/builds+tests.yml b/.github/workflows/builds+tests.yml new file mode 100644 index 0000000..6637843 --- /dev/null +++ b/.github/workflows/builds+tests.yml @@ -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' diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml new file mode 100644 index 0000000..84247ea --- /dev/null +++ b/.github/workflows/nightly.yml @@ -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