mirror of
https://github.com/XFox111/my-website.git
synced 2026-04-22 07:28:01 +03:00
chore(ci): ci workflow update
This commit is contained in:
@@ -0,0 +1,45 @@
|
|||||||
|
name: Audit pipeline
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths-ignore:
|
||||||
|
- '.devcontainer/*'
|
||||||
|
- '.github/*'
|
||||||
|
- '!.github/workflows/audit.yml'
|
||||||
|
- '.vscode/*'
|
||||||
|
- '**.md'
|
||||||
|
- '.env*'
|
||||||
|
- 'LICENSE'
|
||||||
|
- 'COPYING'
|
||||||
|
- '.git*'
|
||||||
|
pull_request:
|
||||||
|
paths-ignore:
|
||||||
|
- '.devcontainer/*'
|
||||||
|
- '.github/*'
|
||||||
|
- '!.github/workflows/audit.yml'
|
||||||
|
- '.vscode/*'
|
||||||
|
- '**.md'
|
||||||
|
- '.env*'
|
||||||
|
- 'LICENSE'
|
||||||
|
- 'COPYING'
|
||||||
|
- '.git*'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
audit:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: node:24
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- run: yarn npm audit
|
||||||
|
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
tags: "my-website:ci"
|
||||||
@@ -1,37 +1,10 @@
|
|||||||
name: "CI pipeline"
|
name: "CI pipeline"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
release:
|
||||||
branches: [ "main" ]
|
types:
|
||||||
paths-ignore:
|
- published
|
||||||
- '.devcontainer/*'
|
|
||||||
- '.github/*'
|
|
||||||
- '!.github/workflows/ci.yml'
|
|
||||||
- '.vscode/*'
|
|
||||||
- '**.md'
|
|
||||||
- '.env*'
|
|
||||||
- 'LICENSE'
|
|
||||||
- 'COPYING'
|
|
||||||
- '.git*'
|
|
||||||
pull_request:
|
|
||||||
branches: [ "main", "next" ]
|
|
||||||
paths-ignore:
|
|
||||||
- '.devcontainer/*'
|
|
||||||
- '.github/*'
|
|
||||||
- '!.github/workflows/ci.yml'
|
|
||||||
- '.vscode/*'
|
|
||||||
- '**.md'
|
|
||||||
- '.env*'
|
|
||||||
- 'LICENSE'
|
|
||||||
- 'COPYING'
|
|
||||||
- '.git*'
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
|
||||||
push:
|
|
||||||
type: boolean
|
|
||||||
required: false
|
|
||||||
default: false
|
|
||||||
description: "Push to Docker Hub"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -51,17 +24,15 @@ jobs:
|
|||||||
ghcr.io/${{ github.repository }}
|
ghcr.io/${{ github.repository }}
|
||||||
tags: |
|
tags: |
|
||||||
latest
|
latest
|
||||||
${{ github.sha }}
|
${{ github.ref_name }}
|
||||||
|
|
||||||
- name: "Login to Docker Hub"
|
- name: "Login to Docker Hub"
|
||||||
if: github.event_name != 'pull_request' || github.event.inputs.push == 'true'
|
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
- name: "Login to GitHub Container Registry"
|
- name: "Login to GitHub Container Registry"
|
||||||
if: github.event_name != 'pull_request' || github.event.inputs.push == 'true'
|
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
@@ -71,5 +42,4 @@ jobs:
|
|||||||
- uses: docker/build-push-action@v6
|
- uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: ${{ github.event_name != 'pull_request' || github.event.inputs.push == 'true' }}
|
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "my-website",
|
"name": "my-website",
|
||||||
"version": "1.0.0",
|
"version": "0.0.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"homepage": "https://xfox111.net",
|
"homepage": "https://xfox111.net",
|
||||||
"license": "(MIT with exception)",
|
"license": "(MIT with exception)",
|
||||||
|
|||||||
Reference in New Issue
Block a user