Use alpine as base images. (#1033)

This commit is contained in:
Googol Lee
2024-09-02 18:35:45 +02:00
committed by GitHub
parent ad13172a32
commit 85c1e52b06
9 changed files with 47 additions and 187 deletions

View File

@@ -1,14 +1,15 @@
name: Docker builds
on:
pull_request:
branches: [master]
push:
branches: [master]
tags:
- v*
pull_request:
branches: [master]
env:
IS_PUSHING_IMAGES: ${{ github.event_name != 'pull_request' && github.repository == 'photoview/photoview' }}
DOCKER_USERNAME: viktorstrate
DOCKER_IMAGE: viktorstrate/photoview
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
@@ -20,9 +21,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Delete huge unnecessary tools folder
run: rm -rf /opt/hostedtoolcache
- name: Checkout
uses: actions/checkout@v4
@@ -36,7 +34,7 @@ jobs:
uses: docker/setup-buildx-action@v3
- name: Docker Login
if: success() && github.event_name != 'pull_request' && github.repository == 'photoview/photoview'
if: ${{ env.IS_PUSHING_IMAGES == 'true' }}
uses: docker/login-action@v3
with:
username: ${{ env.DOCKER_USERNAME }}
@@ -64,7 +62,7 @@ jobs:
context: .
platforms: ${{ env.PLATFORMS }}
pull: true
push: ${{ github.event_name != 'pull_request' && github.repository == 'photoview/photoview' }}
push: ${{ env.IS_PUSHING_IMAGES }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
cache-from: type=gha