Add options for preprod Zulip (#112) #32
Workflow file for this run
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: Docker Image Build on tag or release | |
| on: | |
| push: | |
| tags: | |
| - '*' | |
| release: | |
| types: [published] | |
| env: | |
| ORG: opentelekomcloud | |
| PROJECT: eyes_on_docs | |
| permissions: | |
| contents: read | |
| jobs: | |
| push_if_tag: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Docker meta | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: | | |
| "${{ secrets.REGISTRY }}/${{ env.ORG }}/${{ env.PROJECT }}" | |
| tags: | | |
| type=schedule | |
| type=ref,event=branch | |
| type=ref,event=pr | |
| type=semver,pattern={{version}} | |
| type=semver,pattern={{major}}.{{minor}} | |
| type=semver,pattern={{major}} | |
| type=sha | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Generate SWR login key | |
| id: swr_key | |
| env: | |
| SWR_AK: ${{ secrets.SWR_AK }} | |
| SWR_SK: ${{ secrets.SWR_SK }} | |
| run: | | |
| LOGIN_KEY=$(printf '%s' "$SWR_AK" | \ | |
| openssl dgst -binary -sha256 -hmac "$SWR_SK" | \ | |
| od -An -vtx1 | \ | |
| sed 's/[ \n]//g' | \ | |
| sed 'N;s/\n//') | |
| echo "::add-mask::$LOGIN_KEY" | |
| echo "login_key=$LOGIN_KEY" >> "$GITHUB_OUTPUT" | |
| - name: Login to Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ secrets.REGISTRY }} | |
| username: eu-de@${{ secrets.SWR_AK }} | |
| password: ${{ steps.swr_key.outputs.login_key }} | |
| - name: Build and push | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| push: true | |
| # provenance diasbles attestation manifest generation, if true - Invalid image, fail to parse 'manifest.json' | |
| provenance: false |