291st/.github/workflows/build.yaml

41 lines
1.0 KiB
YAML
Raw Normal View History

2023-07-26 21:11:30 -04:00
name: Build
run-name: ${{ gitea.actor }} is building
on: [push]
jobs:
2023-07-28 09:28:53 -04:00
Dependencies:
2023-07-28 09:31:25 -04:00
name: Install NPM dependencies
2023-07-26 21:17:56 -04:00
runs-on: Docker
2023-07-26 21:17:30 -04:00
container:
2023-07-26 21:47:07 -04:00
image: node:16
2023-07-26 21:11:30 -04:00
steps:
2023-07-26 21:47:07 -04:00
- name: Checkout Repository
2023-07-26 21:11:30 -04:00
uses: actions/checkout@v3
2023-07-26 23:33:15 -04:00
- name: Restore Cached Dependencies
2023-07-26 23:32:41 -04:00
uses: actions/cache/restore@v3
with:
2023-07-26 23:57:19 -04:00
path: ./node_modules
2023-07-26 23:36:40 -04:00
key: node_modules
2023-07-27 00:03:17 -04:00
restore-keys: node_modules
2023-07-26 21:47:07 -04:00
- name: Install Dependencies
2023-07-26 23:57:19 -04:00
run: npm ci
2023-07-26 21:56:20 -04:00
- name: Cache Dependencies
2023-07-26 21:53:35 -04:00
uses: actions/cache@v3
2023-07-26 21:47:07 -04:00
with:
2023-07-26 23:57:19 -04:00
path: ./node_modules
2023-07-26 23:36:40 -04:00
key: node_modules
2023-07-27 00:03:17 -04:00
restore-keys: node_modules
2023-07-28 09:28:53 -04:00
Docker:
2023-07-28 09:31:25 -04:00
name: Build & publish docker image
needs: Dependencies
runs-on: Docker
container:
image: docker
steps:
2023-07-28 09:46:51 -04:00
- uses: ztimson/291st/.github/workflows/docker-publish.yaml@develop
2023-07-28 09:31:25 -04:00
with:
image: 291st
secrets:
registry_user: ztimson
2023-07-28 09:44:14 -04:00
registry_pass: ${{secrets.deploy_token}}