This repository has been archived by the owner on Jun 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create CI for
ffmpeg
in docker (#81)
- Loading branch information
1 parent
f8c6478
commit 78e1b47
Showing
1 changed file
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: "Push image to ghcr" | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
tags: | ||
- v*.*.* | ||
release: | ||
types: [created] | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: wanjohiryan/ffmpeg | ||
BASE_TAG_PREFIX: v6 | ||
|
||
jobs: | ||
build-and-push-git-pkg: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
# | ||
# do not run on forks | ||
if: github.repository_owner == 'wanjohiryan' | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Log into registry ${{ env.REGISTRY }} | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract Container metadata | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/${{ env.BASE_TAG_PREFIX }} | ||
# | ||
#tag on release, and a nightly build for 'dev' | ||
tags: | | ||
type=raw,value=nightly,enable={{is_default_branch}} | ||
type=ref,event=tag | ||
type=semver,pattern={{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
type=semver,pattern={{major}} | ||
- name: Build and push image | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: ./ | ||
file: docker/ffmpeg/Dockerfile | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |