This commit is contained in:
parent
d5ccc4e570
commit
fc5f8b2f11
1 changed files with 0 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 }}
|
|
||||||
Loading…
Add table
Reference in a new issue