Skip to content

Commit

Permalink
build: no need to rebuild same ffmpeg image that has not changed
Browse files Browse the repository at this point in the history
Signed-off-by: deadprogram <[email protected]>
  • Loading branch information
deadprogram committed Oct 22, 2024
1 parent 9050a34 commit c8dbfe3
Showing 1 changed file with 95 additions and 96 deletions.
191 changes: 95 additions & 96 deletions .github/workflows/docker-alpine-improved.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,58 +58,58 @@ jobs:
cache-from: type=gha
cache-to: type=gha,mode=max

ffmpeg:
name: ffmpeg
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Check out the repo
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
gocv/ffmpeg:5.16-alpine
ghcr.io/${{ github.repository_owner }}/ffmpeg:5.16-alpine
tags: |
type=sha,format=long
type=raw,value=latest
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Log in to Github Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
file: Dockerfile.ffmpeg-static-alpine
platforms: linux/amd64,linux/arm64
context: .
push: true
tags: |
gocv/ffmpeg:5.16-alpine
ghcr.io/${{ github.repository_owner }}/ffmpeg:5.16-alpine
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
# ffmpeg:
# name: ffmpeg
# runs-on: ubuntu-latest
# permissions:
# packages: write
# contents: read
# steps:
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v3
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v3
# - name: Check out the repo
# uses: actions/checkout@v4
# - name: Docker meta
# id: meta
# uses: docker/metadata-action@v5
# with:
# images: |
# gocv/ffmpeg:5.16-alpine
# ghcr.io/${{ github.repository_owner }}/ffmpeg:5.16-alpine
# tags: |
# type=sha,format=long
# type=raw,value=latest
# - name: Log in to Docker Hub
# uses: docker/login-action@v3
# with:
# username: ${{ secrets.DOCKER_HUB_USERNAME }}
# password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
# - name: Log in to Github Container Registry
# uses: docker/login-action@v3
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
# - name: Build and push
# uses: docker/build-push-action@v6
# with:
# file: Dockerfile.ffmpeg-static-alpine
# platforms: linux/amd64,linux/arm64
# context: .
# push: true
# tags: |
# gocv/ffmpeg:5.16-alpine
# ghcr.io/${{ github.repository_owner }}/ffmpeg:5.16-alpine
# labels: ${{ steps.meta.outputs.labels }}
# cache-from: type=gha
# cache-to: type=gha,mode=max

opencv:
name: opencv
runs-on: ubuntu-latest
needs: [gstreamer, ffmpeg]
needs: [gstreamer]
permissions:
packages: write
contents: read
Expand Down Expand Up @@ -155,51 +155,50 @@ jobs:
cache-from: type=gha
cache-to: type=gha,mode=max

opencv-ffmpeg:
name: opencv
runs-on: ubuntu-latest
needs: [gstreamer, ffmpeg]
permissions:
packages: write
contents: read
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Check out the repo
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
gocv/opencv:4.10.0-alpine-ffmpeg
ghcr.io/${{ github.repository_owner }}/opencv:4.10.0-alpine-ffmpeg
tags: |
type=sha,format=long
type=raw,value=latest
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Log in to Github Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
file: Dockerfile.opencv-static-alpine-ffmpeg
platforms: linux/amd64,linux/arm64
context: .
push: true
tags: |
gocv/opencv:4.10.0-alpine-ffmpeg
ghcr.io/${{ github.repository_owner }}/opencv:4.10.0-alpine-ffmpeg
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
# opencv-ffmpeg:
# name: opencv
# runs-on: ubuntu-latest
# permissions:
# packages: write
# contents: read
# steps:
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v3
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v3
# - name: Check out the repo
# uses: actions/checkout@v4
# - name: Docker meta
# id: meta
# uses: docker/metadata-action@v5
# with:
# images: |
# gocv/opencv:4.10.0-alpine-ffmpeg
# ghcr.io/${{ github.repository_owner }}/opencv:4.10.0-alpine-ffmpeg
# tags: |
# type=sha,format=long
# type=raw,value=latest
# - name: Log in to Docker Hub
# uses: docker/login-action@v3
# with:
# username: ${{ secrets.DOCKER_HUB_USERNAME }}
# password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
# - name: Log in to Github Container Registry
# uses: docker/login-action@v3
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
# - name: Build and push
# uses: docker/build-push-action@v6
# with:
# file: Dockerfile.opencv-static-alpine-ffmpeg
# platforms: linux/amd64,linux/arm64
# context: .
# push: true
# tags: |
# gocv/opencv:4.10.0-alpine-ffmpeg
# ghcr.io/${{ github.repository_owner }}/opencv:4.10.0-alpine-ffmpeg
# labels: ${{ steps.meta.outputs.labels }}
# cache-from: type=gha
# cache-to: type=gha,mode=max

0 comments on commit c8dbfe3

Please sign in to comment.