mirror of
https://git.vectorsigma.ru/public/photoview.git
synced 2026-08-03 22:19:07 +00:00
Fix gqlgen (#1105)
This commit is contained in:
22
.github/workflows/build.yml
vendored
22
.github/workflows/build.yml
vendored
@@ -1,20 +1,22 @@
|
||||
name: Docker builds
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [master]
|
||||
push:
|
||||
branches: [master]
|
||||
branches: ['*']
|
||||
tags:
|
||||
- v*
|
||||
pull_request:
|
||||
branches: [master]
|
||||
schedule:
|
||||
# At 01:18 every Thursday. Details in https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#schedule
|
||||
- cron: '18 1 * * 4'
|
||||
|
||||
env:
|
||||
IS_PUSHING_IMAGES: ${{ github.event_name != 'pull_request' && github.repository == 'photoview/photoview' }}
|
||||
# IS_PUSHING_IMAGES: true # Switch on when pushing images with forked repos.
|
||||
DOCKER_REGISTRY: ${{ (github.repository == 'photoview/photoview' && '') || 'ghcr.io/' }}
|
||||
DOCKER_USERNAME: viktorstrate
|
||||
DOCKER_IMAGE: viktorstrate/photoview
|
||||
DOCKER_IMAGE: ${{ (github.repository == 'photoview/photoview' && 'viktorstrate/photoview') || github.repository }}
|
||||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
||||
PLATFORMS: linux/amd64,linux/arm64,linux/arm/v7
|
||||
|
||||
@@ -82,7 +84,6 @@ jobs:
|
||||
with:
|
||||
platforms: ${{ env.PLATFORMS }}
|
||||
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
@@ -90,15 +91,16 @@ jobs:
|
||||
if: ${{ env.IS_PUSHING_IMAGES == 'true' }}
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ env.DOCKER_USERNAME }}
|
||||
password: ${{ env.DOCKER_PASSWORD }}
|
||||
registry: ${{ env.DOCKER_REGISTRY == 'ghcr.io/' && 'ghcr.io' }}
|
||||
username: ${{ ( env.DOCKER_REGISTRY == 'ghcr.io/' && github.actor ) || env.DOCKER_USERNAME }}
|
||||
password: ${{ ( env.DOCKER_REGISTRY == 'ghcr.io/' && github.token ) || env.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Docker meta
|
||||
id: docker_meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
# list of Docker images to use as base name for tags
|
||||
images: ${{ env.DOCKER_IMAGE }}
|
||||
images: ${{ env.DOCKER_REGISTRY }}${{ env.DOCKER_IMAGE }}
|
||||
# Docker tags based on the following events/attributes
|
||||
tags: |
|
||||
type=schedule
|
||||
@@ -152,13 +154,13 @@ jobs:
|
||||
username: ${{ env.DOCKER_USERNAME }}
|
||||
password: ${{ env.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Run Dockle for '${{ env.DOCKER_IMAGE }}:${{ matrix.tags.tag }}'
|
||||
- name: Run Dockle for '${{ env.DOCKER_REGISTRY }}${{ env.DOCKER_IMAGE }}:${{ matrix.tags.tag }}'
|
||||
id: dockle
|
||||
if: ${{ matrix.tags.tag != '' }}
|
||||
continue-on-error: true
|
||||
uses: erzz/dockle-action@v1
|
||||
with:
|
||||
image: '${{ env.DOCKER_IMAGE }}:${{ matrix.tags.tag }}'
|
||||
image: '${{ env.DOCKER_REGISTRY }}${{ env.DOCKER_IMAGE }}:${{ matrix.tags.tag }}'
|
||||
report-name: dockle-results-${{ matrix.tags.tag }}
|
||||
report-format: sarif
|
||||
failure-threshold: fatal
|
||||
|
||||
5
.github/workflows/tests.yml
vendored
5
.github/workflows/tests.yml
vendored
@@ -2,7 +2,7 @@ name: Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
branches: ['*']
|
||||
pull_request:
|
||||
branches: [master]
|
||||
|
||||
@@ -69,12 +69,13 @@ jobs:
|
||||
continue-on-error: true
|
||||
run: |
|
||||
docker run --name test --network host \
|
||||
-v "${{ github.workspace }}:/app" \
|
||||
-e PHOTOVIEW_DATABASE_DRIVER=${{ matrix.database }} \
|
||||
-e PHOTOVIEW_MYSQL_URL='photoview:photosecret@tcp(localhost:3306)/photoview_test' \
|
||||
-e PHOTOVIEW_POSTGRES_URL='postgres://photoview:photosecret@localhost:5432/photoview_test' \
|
||||
-e PHOTOVIEW_SQLITE_PATH=/tmp/photoview.db \
|
||||
photoview/api \
|
||||
go test ./... -v -database -filesystem -p 1 -coverprofile=coverage.txt -covermode=atomic
|
||||
/app/scripts/test_all.sh
|
||||
docker cp test:/app/api/coverage.txt ./api/
|
||||
|
||||
- name: Upload coverage
|
||||
|
||||
Reference in New Issue
Block a user