Bump flexget from 3.13.5 to 3.13.27 #18
Workflow file for this run
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
name: Build and push | |
on: | |
push: | |
branches: | |
- 'main' | |
paths-ignore: | |
- 'README**' | |
- 'LICENSE' | |
pull_request_target: | |
paths-ignore: | |
- 'README**' | |
- 'LICENSE' | |
env: | |
REGISTRY_IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/flexget | |
GHCR_IMAGE: ghcr.io/${{ github.repository_owner }}/flexget | |
jobs: | |
prepare: | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.platforms.outputs.matrix }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- id: platforms | |
run: | | |
echo "matrix=$(docker buildx f all --print | jq -cr '.target.all.platforms')" >> ${GITHUB_OUTPUT} | |
- id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: | | |
${{ env.REGISTRY_IMAGE }} | |
${{ env.GHCR_IMAGE }} | |
tags: | | |
type=raw,value=latest,enable={{is_default_branch}} | |
type=ref,event=branch | |
type=ref,event=pr | |
type=pep440,pattern={{version}} | |
type=pep440,pattern={{major}}.{{minor}} | |
type=pep440,pattern={{major}} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: bake-meta | |
path: ${{ steps.meta.outputs.bake-file }} | |
retention-days: 1 | |
build: | |
runs-on: ubuntu-latest | |
needs: | |
- prepare | |
strategy: | |
matrix: | |
platform: ${{ fromJson(needs.prepare.outputs.matrix) }} | |
steps: | |
- run: | | |
platform=${{ matrix.platform }} | |
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- uses: actions/download-artifact@v4 | |
with: | |
name: bake-meta | |
path: /tmp | |
- uses: docker/setup-qemu-action@v3 | |
- uses: docker/setup-buildx-action@v3 | |
- uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- id: bake | |
uses: docker/bake-action@v5 | |
with: | |
files: | | |
./docker-bake.hcl | |
/tmp/docker-metadata-action-bake.json | |
targets: all | |
set: | | |
*.tags= | |
*.platform=${{ matrix.platform }} | |
*.output=type=registry,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true | |
- run: | | |
mkdir -p /tmp/digests | |
digest="${{ fromJSON(steps.bake.outputs.metadata).all['containerimage.digest'] }}" | |
touch "/tmp/digests/${digest#sha256:}" | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: digests-${{ env.PLATFORM_PAIR }} | |
path: /tmp/digests/* | |
retention-days: 1 | |
merge: | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
name: bake-meta | |
path: /tmp | |
- uses: actions/download-artifact@v4 | |
with: | |
path: /tmp/digests | |
pattern: digests-* | |
merge-multiple: true | |
- uses: docker/setup-buildx-action@v3 | |
- uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- working-directory: /tmp/digests | |
run: | | |
docker buildx imagetools create $(jq -cr '.target."docker-metadata-action".tags | | |
map(select(startswith("${{ env.REGISTRY_IMAGE }}") or startswith("${{ env.GHCR_IMAGE }}")) | "-t " + .) | | |
join(" ")' /tmp/docker-metadata-action-bake.json) $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *) |