Bump mikepenz/action-junit-report in the github-actions group #524
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: Release | |
| on: | |
| push: | |
| branches: | |
| - develop | |
| tags: | |
| - '[0-9]+.[0-9]+.[0-9]+' | |
| env: | |
| DEFAULT_PYTHON: '3.13' | |
| jobs: | |
| release: | |
| name: Build & push image to Dockerhub | |
| runs-on: ubuntu-latest | |
| if: github.repository == 'MobileTeleSystems/data-rentgen' | |
| steps: | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Python ${{ env.DEFAULT_PYTHON }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ env.DEFAULT_PYTHON }} | |
| - name: Get version | |
| id: get_version | |
| run: | | |
| echo "VERSION=$(cat data_rentgen/VERSION)" >> $GITHUB_ENV | |
| - name: Docker meta | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: mtsrus/data-rentgen | |
| labels: | | |
| org.opencontainers.image.title=Data.Rentgen | |
| org.opencontainers.image.vendor=MTS PJSC | |
| org.opencontainers.image.documentation=https://data-rentgen.readthedocs.io | |
| org.opencontainers.image.url=https://hub.docker.com/r/mtsrus/data-rentgen | |
| org.opencontainers.image.authors=MWS Data Bridge <[email protected]> | |
| org.opencontainers.image.version=${{ env.VERSION }} | |
| - name: Set platforms | |
| id: set_platforms | |
| run: | | |
| # Building krb5 on ARM is time consuming, do this only at release | |
| if [[ "${{ github.ref_type }}" == "branch" && "${{ github.ref_name }}" == "develop" ]]; then | |
| echo "PLATFORMS=linux/amd64" >> $GITHUB_ENV | |
| elif [[ "${{ github.ref_type }}" == "tag" ]]; then | |
| echo "PLATFORMS=linux/amd64,linux/arm64/v8" >> $GITHUB_ENV | |
| fi | |
| # https://docs.docker.com/build/ci/github-actions/cache/#local-cache | |
| - name: Cache Docker layers | |
| uses: actions/cache@v5 | |
| with: | |
| path: ${{ runner.temp }}/.buildx-cache | |
| key: ${{ runner.os }}-buildx-${{ hashFiles('docker/Dockerfile', 'pyproject.toml', 'uv.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-buildx- | |
| - name: Build Backend Image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: docker/Dockerfile | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| pull: true | |
| push: true | |
| cache-from: type=local,src=${{ runner.temp }}/.buildx-cache | |
| cache-to: type=local,dest=${{ runner.temp }}/.buildx-cache-new,mode=max,compression=zstd,compression-level=3 | |
| platforms: ${{ env.PLATFORMS }} | |
| provenance: mode=max | |
| sbom: true | |
| # Temp fix | |
| # https://github.com/docker/build-push-action/issues/252 | |
| # https://github.com/moby/buildkit/issues/1896 | |
| - name: Move cache | |
| run: | | |
| rm -rf ${{ runner.temp }}/.buildx-cache | |
| mv ${{ runner.temp }}/.buildx-cache-new ${{ runner.temp }}/.buildx-cache | |
| - name: Convert README to Markdown | |
| uses: docker://pandoc/core:2.9 | |
| with: | |
| args: >- | |
| --output=README.md | |
| --from=rst | |
| --to=gfm | |
| --wrap=none | |
| README.rst | |
| - name: Update DockerHub Description | |
| uses: peter-evans/dockerhub-description@v5 | |
| if: github.ref_type == 'tag' | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| # this requires token with read+write+delete permissions. read+write is not enough! | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| repository: mtsrus/data-rentgen | |
| short-description: ${{ github.event.repository.description }} | |
| enable-url-completion: true |