mirror of
https://github.com/nosial/FileServer.git
synced 2025-06-07 13:48:36 +00:00
Add configuration classes, enums, and database handling for FileServer
Some checks failed
Docker CI/CD / build-and-save (push) Has been cancelled
Docker CI/CD / build-and-push (push) Has been cancelled
CI / release (push) Has been cancelled
CI / debug (push) Has been cancelled
CI / release_executable (push) Has been cancelled
CI / debug_executable (push) Has been cancelled
CI / check-phpunit (push) Has been cancelled
CI / check-phpdoc (push) Has been cancelled
CI / generate-phpdoc (push) Has been cancelled
CI / test (push) Has been cancelled
CI / release-documentation (push) Has been cancelled
CI / release-artifacts (push) Has been cancelled
Some checks failed
Docker CI/CD / build-and-save (push) Has been cancelled
Docker CI/CD / build-and-push (push) Has been cancelled
CI / release (push) Has been cancelled
CI / debug (push) Has been cancelled
CI / release_executable (push) Has been cancelled
CI / debug_executable (push) Has been cancelled
CI / check-phpunit (push) Has been cancelled
CI / check-phpdoc (push) Has been cancelled
CI / generate-phpdoc (push) Has been cancelled
CI / test (push) Has been cancelled
CI / release-documentation (push) Has been cancelled
CI / release-artifacts (push) Has been cancelled
This commit is contained in:
parent
8db44e90d5
commit
72da412737
45 changed files with 3837 additions and 10 deletions
76
.github/workflows/docker.yml
vendored
Normal file
76
.github/workflows/docker.yml
vendored
Normal file
|
@ -0,0 +1,76 @@
|
|||
name: Docker CI/CD
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '**'
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
|
||||
permissions:
|
||||
packages: write
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build-and-save:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'push'
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Build Docker image
|
||||
run: |
|
||||
IMAGE_NAME=$(echo ${{ github.repository }} | cut -d'/' -f2)
|
||||
docker build -t $IMAGE_NAME:${{ github.sha }} .
|
||||
|
||||
- name: Save Docker image as .tar artifact
|
||||
run: |
|
||||
IMAGE_NAME=$(echo ${{ github.repository }} | cut -d'/' -f2)
|
||||
docker save $IMAGE_NAME:${{ github.sha }} > docker-image-${{ github.sha }}.tar
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: docker-image-${{ github.sha }}
|
||||
path: docker-image-${{ github.sha }}.tar
|
||||
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'release'
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Log in to GitHub Container Registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: docker.io
|
||||
username: ${{ secrets.REGISTRY_USER }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile
|
||||
tags: |
|
||||
ghcr.io/${{ github.repository }}:${{ github.event.release.tag_name }}
|
||||
ghcr.io/${{ github.repository }}:latest
|
||||
docker.io/your-dockerhub-username:${{ github.event.release.tag_name }}
|
||||
docker.io/your-dockerhub-username:latest
|
||||
push: true
|
Loading…
Add table
Add a link
Reference in a new issue