Use reusable action from docker
This commit is contained in:
57
.github/workflows/ci.yaml
vendored
57
.github/workflows/ci.yaml
vendored
@@ -27,6 +27,7 @@ jobs:
|
|||||||
if: ${{ !cancelled() && 'pull_request' != github.event_name }}
|
if: ${{ !cancelled() && 'pull_request' != github.event_name }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
|
IMAGE_NAME: ${{ env.IMAGE_NAME }}
|
||||||
ffmpeg-date: ${{ steps.jq.outputs.FFMPEG_DATE }}
|
ffmpeg-date: ${{ steps.jq.outputs.FFMPEG_DATE }}
|
||||||
ffmpeg-releases: ${{ steps.ffmpeg.outputs.releases }}
|
ffmpeg-releases: ${{ steps.ffmpeg.outputs.releases }}
|
||||||
ffmpeg-version: ${{ steps.jq.outputs.FFMPEG_VERSION }}
|
ffmpeg-version: ${{ steps.jq.outputs.FFMPEG_VERSION }}
|
||||||
@@ -184,11 +185,13 @@ jobs:
|
|||||||
cancel-in-progress: false
|
cancel-in-progress: false
|
||||||
steps:
|
steps:
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
|
if: false
|
||||||
uses: docker/setup-qemu-action@v4
|
uses: docker/setup-qemu-action@v4
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
id: buildx
|
id: buildx
|
||||||
uses: docker/setup-buildx-action@v4
|
uses: docker/setup-buildx-action@v4
|
||||||
- name: Log into GitHub Container Registry
|
- name: Log into GitHub Container Registry
|
||||||
|
if: false
|
||||||
env:
|
env:
|
||||||
DOCKER_REGISTRY: https://ghcr.io
|
DOCKER_REGISTRY: https://ghcr.io
|
||||||
DOCKER_USERNAME: ${{ github.repository_owner }}
|
DOCKER_USERNAME: ${{ github.repository_owner }}
|
||||||
@@ -234,6 +237,7 @@ jobs:
|
|||||||
--highestUserWastedPercent '0.05' \
|
--highestUserWastedPercent '0.05' \
|
||||||
--highestWastedBytes '50M'
|
--highestWastedBytes '50M'
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
|
if: false
|
||||||
id: build-push
|
id: build-push
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
uses: docker/build-push-action@v7
|
uses: docker/build-push-action@v7
|
||||||
@@ -254,23 +258,36 @@ jobs:
|
|||||||
FFMPEG_VERSION=${{ needs.info.outputs.ffmpeg-version }}
|
FFMPEG_VERSION=${{ needs.info.outputs.ffmpeg-version }}
|
||||||
YTDLP_DATE=${{ fromJSON(needs.info.outputs.ytdlp-latest-release).tag.name }}
|
YTDLP_DATE=${{ fromJSON(needs.info.outputs.ytdlp-latest-release).tag.name }}
|
||||||
|
|
||||||
#permissions:
|
build:
|
||||||
# contents: read
|
if: ${{ !cancelled() && 'success' == needs.info.result }}
|
||||||
#jobs:
|
needs: ['info', 'test']
|
||||||
# build:
|
uses: docker/github-builder/.github/workflows/build.yml@v1
|
||||||
# if: ${{ !cancelled() && 'success' == needs.info.result }}
|
permissions:
|
||||||
# needs: ['info', 'test']
|
contents: read # to fetch the repository content
|
||||||
# uses: docker/github-builder/.github/workflows/build.yml@v1
|
id-token: write # for signing attestation(s) with GitHub OIDC Token
|
||||||
# permissions:
|
secrets:
|
||||||
# contents: read # to fetch the repository content
|
registry-auths: |
|
||||||
# id-token: write # for signing attestation(s) with GitHub OIDC Token
|
- registry: ghcr.io
|
||||||
# with:
|
username: ${{ github.repository_owner }}
|
||||||
# cache-mode: max
|
password: ${{ 'meeb' == github.repository_owner && secrets.REGISTRY_ACCESS_TOKEN || secrets.GITHUB_TOKEN }}
|
||||||
# output: image
|
with:
|
||||||
# push: ${{ 'success' == needs.test.result && 'meeb' == github.repository_owner && 'pull_request' != github.event_name && 'true' || 'false' }}
|
cache: true
|
||||||
# meta-images: name/app
|
cache-mode: max
|
||||||
# secrets:
|
meta-images: ${{ needs.info.outputs.lowercase-github-repository_owner }}/${{ needs.info.outputs.IMAGE_NAME }}
|
||||||
# registry-auths: |
|
output: image
|
||||||
# - registry: docker.io
|
platforms: linux/amd64,linux/arm64
|
||||||
# username: ${{ vars.DOCKERHUB_USERNAME }}
|
push: ${{ 'success' == needs.test.result && 'meeb' == github.repository_owner && 'pull_request' != github.event_name && 'true' || 'false' }}
|
||||||
# password: ${{ secrets.DOCKERHUB_TOKEN }}
|
setup-qemu: true
|
||||||
|
meta-flavor: |
|
||||||
|
latest=false
|
||||||
|
meta-tags: |
|
||||||
|
type=schedule,pattern=weekly
|
||||||
|
type=raw,enable={{is_default_branch}},value=latest
|
||||||
|
type=raw,enable={{is_not_default_branch}},value=test
|
||||||
|
type=ref,event=tag
|
||||||
|
type=ref,event=pr
|
||||||
|
build-args: |
|
||||||
|
IMAGE_NAME=${{ needs.info.outputs.IMAGE_NAME }}
|
||||||
|
FFMPEG_DATE=${{ needs.info.outputs.ffmpeg-date }}
|
||||||
|
FFMPEG_VERSION=${{ needs.info.outputs.ffmpeg-version }}
|
||||||
|
YTDLP_DATE=${{ fromJSON(needs.info.outputs.ytdlp-latest-release).tag.name }}
|
||||||
|
|||||||
Reference in New Issue
Block a user