|
| 1 | +# Copyright (c) 2024 Intel Corporation |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | + |
| 15 | +name: Docker Description Publish |
| 16 | +on: |
| 17 | + push: |
| 18 | + branches: [ "main" ] |
| 19 | +permissions: read-all |
| 20 | +jobs: |
| 21 | + setup-matrix: |
| 22 | + runs-on: ubuntu-latest |
| 23 | + outputs: |
| 24 | + matrix: ${{ steps.set-matrix.outputs.matrix }} |
| 25 | + steps: |
| 26 | + - uses: actions/checkout@v4 |
| 27 | + - name: Set matrix data |
| 28 | + id: set-matrix |
| 29 | + run: echo "matrix=$(jq -c . < .github/dockerhub-readmes.json)" >> $GITHUB_OUTPUT |
| 30 | + publish-dockerhub-description: |
| 31 | + runs-on: ubuntu-latest |
| 32 | + needs: setup-matrix |
| 33 | + strategy: |
| 34 | + matrix: ${{ fromJson(needs.setup-matrix.outputs.matrix) }} |
| 35 | + fail-fast: false |
| 36 | + steps: |
| 37 | + - uses: actions/checkout@v4 |
| 38 | + - uses: peter-evans/dockerhub-description@v4 |
| 39 | + with: |
| 40 | + username: ${{ secrets.DOCKERHUB_USERNAME }} |
| 41 | + password: ${{ secrets.DOCKERHUB_PASSWORD }} |
| 42 | + repository: ${{ matrix.readmes.repo-name }} |
| 43 | + readme-filepath: ${{ matrix.readmes.fname }} |
0 commit comments