|
42 | 42 | required: false |
43 | 43 | default: jesec/flood |
44 | 44 | type: string |
45 | | - build-rtorrent: |
46 | | - description: Whether to build rtorrent-flood image |
47 | | - required: false |
48 | | - default: true |
49 | | - type: boolean |
50 | | - rtorrent-tags: |
51 | | - description: Docker tags for the rtorrent-flood image (newline separated) |
52 | | - required: false |
53 | | - default: jesec/rtorrent-flood:dev |
54 | | - type: string |
55 | | - rtorrent-version: |
56 | | - description: rtorrent version to embed |
57 | | - required: false |
58 | | - default: master |
59 | | - type: string |
60 | | - rtorrent-registry: |
61 | | - description: Registry host for rtorrent base image |
62 | | - required: false |
63 | | - default: docker.io |
64 | | - type: string |
65 | | - rtorrent-repository: |
66 | | - description: Repository path for rtorrent base image |
67 | | - required: false |
68 | | - default: jesec/rtorrent |
69 | | - type: string |
70 | | - rtorrent-image: |
71 | | - description: Full image reference for rtorrent base |
72 | | - required: false |
73 | | - default: docker.io/jesec/rtorrent:master |
74 | | - type: string |
75 | 45 |
|
76 | 46 | jobs: |
77 | 47 | docker: |
|
103 | 73 | id: local |
104 | 74 | run: | |
105 | 75 | printf 'flood=%s\n' "${LOCAL_REGISTRY}/${{ inputs['flood-repository'] }}:${{ inputs['flood-version'] }}" >> "$GITHUB_OUTPUT" |
106 | | - printf 'rtorrent=%s\n' "${LOCAL_REGISTRY}/rtorrent-flood:${{ inputs['rtorrent-version'] }}" >> "$GITHUB_OUTPUT" |
107 | 76 |
|
108 | 77 | - name: Set up QEMU |
109 | 78 | uses: docker/setup-qemu-action@v3 |
@@ -162,29 +131,3 @@ jobs: |
162 | 131 | [ -z "$tag" ] && continue |
163 | 132 | regctl image copy "$LOCAL_TAG" "$tag" |
164 | 133 | done <<< "${{ inputs['flood-tags'] }}" |
165 | | -
|
166 | | - - name: Build rtorrent-flood image |
167 | | - if: inputs.build-rtorrent |
168 | | - id: build_rtorrent |
169 | | - uses: docker/build-push-action@v5 |
170 | | - with: |
171 | | - context: . |
172 | | - file: ./distribution/containers/Dockerfile.rtorrent |
173 | | - platforms: ${{ inputs.platforms }} |
174 | | - push: true |
175 | | - pull: false |
176 | | - network: host |
177 | | - tags: ${{ steps.local.outputs.rtorrent }} |
178 | | - build-args: | |
179 | | - FLOOD_IMAGE=${{ steps.local.outputs.flood }} |
180 | | - RTORRENT_IMAGE=${{ inputs['rtorrent-image'] }} |
181 | | -
|
182 | | - - name: Mirror rtorrent-flood image to targets |
183 | | - if: inputs.push && inputs.build-rtorrent |
184 | | - env: |
185 | | - LOCAL_TAG: ${{ steps.local.outputs.rtorrent }} |
186 | | - run: | |
187 | | - while IFS= read -r tag; do |
188 | | - [ -z "$tag" ] && continue |
189 | | - regctl image copy "$LOCAL_TAG" "$tag" |
190 | | - done <<< "${{ inputs['rtorrent-tags'] }}" |
0 commit comments