1
0
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:
2025-07-23 08:37:13 +00:00
parent bcb22a7740
commit 223309d9a6
3 changed files with 50 additions and 35 deletions
+4 -34
View File
@@ -1,37 +1,10 @@
name: "CI pipeline"
on:
push:
branches: [ "main" ]
paths-ignore:
- '.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*'
release:
types:
- published
workflow_dispatch:
inputs:
push:
type: boolean
required: false
default: false
description: "Push to Docker Hub"
jobs:
build:
@@ -51,17 +24,15 @@ jobs:
ghcr.io/${{ github.repository }}
tags: |
latest
${{ github.sha }}
${{ github.ref_name }}
- name: "Login to Docker Hub"
if: github.event_name != 'pull_request' || github.event.inputs.push == 'true'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: "Login to GitHub Container Registry"
if: github.event_name != 'pull_request' || github.event.inputs.push == 'true'
uses: docker/login-action@v3
with:
registry: ghcr.io
@@ -71,5 +42,4 @@ jobs:
- uses: docker/build-push-action@v6
with:
context: .
push: ${{ github.event_name != 'pull_request' || github.event.inputs.push == 'true' }}
tags: ${{ steps.meta.outputs.tags }}