Update github actions (main) (major) (#8590) #148
This file contains hidden or 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: Update Docker Hub Description | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - README.md | |
| - .github/workflows/dockerhub-description.yml | |
| concurrency: | |
| group: ${{ github.ref_name }}-dockerhub | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| dockerHubDescription: | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: read | |
| id-token: write | |
| if: ${{ github.event.repository.fork == false }} | |
| steps: | |
| - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| - name: Modify readme for DockerHub | |
| run: | | |
| sed -i '3,4d' README.md | |
| - name: Azure login | |
| uses: azure/login@a457da9ea143d694b1b9c7c869ebb04ebe844ef5 # v2.3.0 | |
| with: | |
| client-id: ${{ secrets.AZURE_COMMON_VAULT_CLIENT_ID }} | |
| tenant-id: ${{ secrets.AZURE_COMMON_VAULT_TENANT_ID }} | |
| subscription-id: ${{ secrets.AZURE_COMMON_VAULT_SUBSCRIPTION_ID }} | |
| - name: Setup secrets | |
| id: secrets | |
| run: | | |
| echo "Setting secrets for job" | |
| DOCKER_USERNAME=$(az keyvault secret show --name docker-username --vault-name ${{ secrets.COMMON_KEYVAULT_NAME }} --query value -o tsv) | |
| echo "::add-mask::$DOCKER_USERNAME" | |
| echo "DOCKER_USERNAME=$DOCKER_USERNAME" >> $GITHUB_OUTPUT | |
| DOCKER_PASSWORD=$(az keyvault secret show --name docker-password --vault-name ${{ secrets.COMMON_KEYVAULT_NAME }} --query value -o tsv) | |
| echo "::add-mask::$DOCKER_PASSWORD" | |
| echo "DOCKER_PASSWORD=$DOCKER_PASSWORD" >> $GITHUB_OUTPUT | |
| - name: Docker Hub Description | |
| uses: peter-evans/dockerhub-description@1b9a80c056b620d92cedb9d9b5a223409c68ddfa # v5.0.0 | |
| with: | |
| username: ${{ steps.secrets.outputs.DOCKER_USERNAME }} | |
| password: ${{ steps.secrets.outputs.DOCKER_PASSWORD }} | |
| repository: nginx/nginx-ingress | |
| short-description: ${{ github.event.repository.description }} |