🤖 Add dev workflow
This commit is contained in:
parent
453203243c
commit
ee8a82209f
41
.github/workflows/docker_dev.yml
vendored
Normal file
41
.github/workflows/docker_dev.yml
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
name: Build Dev Docker
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches-ignore:
|
||||||
|
- "renovate/**"
|
||||||
|
tags-ignore:
|
||||||
|
- "**"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-docker:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: ⬇️ Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: 🛠️ Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
|
- name: 🔒 Login to ghcr.io
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: 🛠️ Get branch name
|
||||||
|
id: branch-name
|
||||||
|
uses: tj-actions/branch-names@v5.4
|
||||||
|
|
||||||
|
- name: 🛠️ Set tag
|
||||||
|
run: |
|
||||||
|
echo "tag=${{ steps.branch-name.outputs.current_branch }}" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: 🔨 Build and push Docker
|
||||||
|
uses: docker/build-push-action@v3
|
||||||
|
with:
|
||||||
|
push: true
|
||||||
|
context: .
|
||||||
|
tags: "ghcr.io/sebclem/claptrapbot-ui:${{ env.tag }}"
|
||||||
|
file: ./Dockerfile
|
32
.github/workflows/node.js.yml
vendored
32
.github/workflows/node.js.yml
vendored
@ -5,29 +5,21 @@ name: Node.js CI
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "main" ]
|
branches: ["main"]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: ⬇️ Checkout
|
- name: ⬇️ Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: ⚒️ Use Node.js 16.x
|
- name: ⚒️ Use Node.js 16.x
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 16.x
|
node-version: 16.x
|
||||||
cache: 'yarn'
|
cache: "yarn"
|
||||||
- name: 🔨 Install dependencies
|
- name: 🔨 Install dependencies
|
||||||
run: yarn install --immutable
|
run: yarn install --immutable
|
||||||
|
|
||||||
- name: 🔨 Build app
|
|
||||||
run: yarn build --mode staging
|
|
||||||
|
|
||||||
# - name: 🚀 Deploy
|
|
||||||
# uses: JamesIves/github-pages-deploy-action@v4.3.3
|
|
||||||
# with:
|
|
||||||
# branch: gh-pages
|
|
||||||
# folder: dist
|
|
||||||
|
|
||||||
|
- name: 🔨 Build app
|
||||||
|
run: yarn build --mode staging
|
||||||
|
@ -20,7 +20,7 @@ WORKDIR /usr/share/nginx/html
|
|||||||
RUN rm -rf ./*
|
RUN rm -rf ./*
|
||||||
# Copy static assets from builder stage
|
# Copy static assets from builder stage
|
||||||
COPY --from=builder /app/dist .
|
COPY --from=builder /app/dist .
|
||||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
COPY nginx/nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
# Containers run nginx with global directives and daemon off
|
# Containers run nginx with global directives and daemon off
|
||||||
ENTRYPOINT ["nginx", "-g", "daemon off;"]
|
ENTRYPOINT ["nginx", "-g", "daemon off;"]
|
||||||
|
|
||||||
|
@ -60,6 +60,6 @@
|
|||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"*.{vue,js,jsx,cjs,mjs,ts,tsx,cts,mts}": "eslint --cache --fix",
|
"*.{vue,js,jsx,cjs,mjs,ts,tsx,cts,mts}": "eslint --cache --fix",
|
||||||
"*.{vue,js,jsx,cjs,mjs,ts,tsx,cts,mts,css,scss,md}": "prettier --write"
|
"*.{vue,js,jsx,cjs,mjs,ts,tsx,cts,mts,css,scss,md,yml,yaml,json}": "prettier --write"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user