mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2025-11-29 08:26:21 +00:00
chore: work on the workflow
This commit is contained in:
40
.github/workflows/docker.yml
vendored
40
.github/workflows/docker.yml
vendored
@@ -73,20 +73,56 @@ jobs:
|
|||||||
echo "TUNING PSYCOPG FOR ${{ matrix.variant.name }}"
|
echo "TUNING PSYCOPG FOR ${{ matrix.variant.name }}"
|
||||||
sed -i "s|psycopg\[binary\]==3.2.13|psycopg\[c\]==3.2.13|" ./src/requirements.txt
|
sed -i "s|psycopg\[binary\]==3.2.13|psycopg\[c\]==3.2.13|" ./src/requirements.txt
|
||||||
|
|
||||||
|
- name: make dest directory
|
||||||
|
run: |
|
||||||
|
mkdir -p /dist
|
||||||
|
|
||||||
- name: Build and export Docker image
|
- name: Build and export Docker image
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ./docker/Dockerfile
|
file: ./docker/Dockerfile
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: false
|
||||||
|
outputs: type=oci,dest=/dist/docker-${{ matrix.variant.name }}.tar
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
platforms: ${{ matrix.variant.arch }}
|
platforms: ${{ matrix.variant.arch }}
|
||||||
|
|
||||||
|
- name: Upload docker image as artifact
|
||||||
|
uses: actions/upload-artifact@v5
|
||||||
|
with:
|
||||||
|
name: docker-image-${{ matrix.variant.name }}
|
||||||
|
path: /dist/docker-${{ matrix.variant.name }}.tar
|
||||||
|
|
||||||
|
docker_merge:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: docker_build
|
||||||
|
steps:
|
||||||
|
- name: Make workspace directory
|
||||||
|
run: mkdir -p /workspace
|
||||||
|
|
||||||
|
- name: Download all artifacts
|
||||||
|
uses: actions/download-artifact@v5
|
||||||
|
with:
|
||||||
|
path: /workspace
|
||||||
|
|
||||||
|
- name: Install unzip
|
||||||
|
run: |
|
||||||
|
apt-get update && apt-get install -y unzip
|
||||||
|
|
||||||
|
- name: List workspace contents
|
||||||
|
run: |
|
||||||
|
cd /workspace
|
||||||
|
for zip in $(find ./ -type f -name "docker*.zip"); do
|
||||||
|
echo "Found zip: $zip";
|
||||||
|
unzip $zip
|
||||||
|
done
|
||||||
|
ls -lah
|
||||||
|
|
||||||
docker_scan:
|
docker_scan:
|
||||||
if: ${{ github.event_name != 'pull_request' }}
|
if: ${{ github.event_name != 'pull_request' }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: docker_build
|
needs: docker_merger
|
||||||
steps:
|
steps:
|
||||||
- name: Log in to Docker Hub
|
- name: Log in to Docker Hub
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
|
|||||||
Reference in New Issue
Block a user