mirror of
https://github.com/nirvana-7777/script.service.ultimate.git
synced 2026-09-16 06:02:35 +02:00
Update docker workflow
This commit is contained in:
@@ -6,17 +6,17 @@ on:
|
||||
tags: [ 'v*' ]
|
||||
pull_request:
|
||||
branches: [ master, main ]
|
||||
workflow_dispatch: # Manual trigger
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5 # v5 runs on Node 24
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
uses: actions/setup-python@v6 # v6 runs on Node 24
|
||||
with:
|
||||
python-version: '3.11'
|
||||
cache: 'pip'
|
||||
@@ -28,8 +28,6 @@ jobs:
|
||||
|
||||
- name: Run tests (if any)
|
||||
run: |
|
||||
# Add your test commands here
|
||||
# Example: python -m pytest tests/ -v
|
||||
echo "No tests configured yet"
|
||||
|
||||
docker:
|
||||
@@ -39,13 +37,13 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5 # v5 runs on Node 24
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
uses: docker/setup-buildx-action@v4 # v4 runs on Node 24
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
uses: docker/login-action@v4 # v4 runs on Node 24
|
||||
if: github.event_name != 'pull_request'
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
@@ -53,7 +51,7 @@ jobs:
|
||||
|
||||
- name: Extract metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
uses: docker/metadata-action@v6 # v6 runs on Node 24
|
||||
with:
|
||||
images: nirvana777/ultimate-backend
|
||||
tags: |
|
||||
@@ -66,7 +64,7 @@ jobs:
|
||||
type=raw,value=latest,enable={{is_default_branch}}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
uses: docker/build-push-action@v6 # v6 runs on Node 24
|
||||
with:
|
||||
context: .
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
|
||||
Reference in New Issue
Block a user