Compare commits
3 commits
01a6013093
...
fc5f8b2f11
| Author | SHA1 | Date | |
|---|---|---|---|
| fc5f8b2f11 | |||
| d5ccc4e570 | |||
| 3e0ba829d3 |
2 changed files with 10 additions and 43 deletions
43
.github/workflows/main.yml
vendored
43
.github/workflows/main.yml
vendored
|
|
@ -1,43 +0,0 @@
|
|||
name: Push to main
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: lts/hydrogen
|
||||
- run: npm ci
|
||||
- run: npm run test:unit
|
||||
build-image:
|
||||
needs:
|
||||
- test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ secrets.GHCR_USERNAME }}
|
||||
password: ${{ secrets.GHCR_PASSWORD }}
|
||||
- name: Declare GIT_COMMIT
|
||||
shell: bash
|
||||
run: |
|
||||
echo "GIT_COMMIT=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV"
|
||||
- name: Build docker image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: ./docker/server/Dockerfile
|
||||
push: true
|
||||
tags: ghcr.io/cgduncan7/autobaan:latest
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
build-args: GIT_COMMIT=${{ env.GIT_COMMIT }}
|
||||
10
.woodpecker/test.yaml
Normal file
10
.woodpecker/test.yaml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
when:
|
||||
- branch: main
|
||||
event: push
|
||||
|
||||
steps:
|
||||
- name: test
|
||||
image: docker.io/node:hydrogen-slim
|
||||
commands:
|
||||
- npm ci
|
||||
- npm run test:unit
|
||||
Loading…
Add table
Reference in a new issue