mirror of
https://github.com/nosial/FileServer.git
synced 2025-06-06 21:48:34 +00:00
Some checks failed
Docker CI/CD / build (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
40 lines
No EOL
1 KiB
YAML
40 lines
No EOL
1 KiB
YAML
name: Docker CI/CD
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- '**'
|
|
release:
|
|
types:
|
|
- published
|
|
|
|
permissions:
|
|
packages: write
|
|
contents: read
|
|
|
|
jobs:
|
|
build:
|
|
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 | tr '[:upper:]' '[:lower:]')
|
|
docker build -t $IMAGE_NAME:${{ github.sha }} .
|
|
|
|
- name: Save Docker image as .tar artifact
|
|
run: |
|
|
IMAGE_NAME=$(echo ${{ github.repository }} | cut -d'/' -f2 | tr '[:upper:]' '[:lower:]')
|
|
docker save $IMAGE_NAME:${{ github.sha }} > docker-image-${{ github.sha }}.tar
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v4 # Updated to v4
|
|
with:
|
|
name: docker-image-${{ github.sha }}
|
|
path: docker-image-${{ github.sha }}.tar |