[DOP-23620] Fix CONTRIBUTING #51
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: Release | |
| on: | |
| push: | |
| branches: | |
| - develop | |
| tags: | |
| - '[0-9]+.[0-9]+.[0-9]+' | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| release: | |
| name: Build & push frontend image to Dockerhub | |
| runs-on: ubuntu-latest | |
| if: github.repository == 'MobileTeleSystems/syncmaster-ui' # prevent running on forks | |
| 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 Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Install Node.JS | |
| uses: actions/setup-node@v4 | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Get version | |
| id: get_version | |
| run: | | |
| version=$(node -p "require('./package.json').version") | |
| echo "VERSION=${version}" >> $GITHUB_ENV | |
| - name: Docker meta | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: mtsrus/syncmaster-ui | |
| labels: | | |
| org.opencontainers.image.title=SyncMaster UI | |
| org.opencontainers.image.vendor=MTS PJSC | |
| org.opencontainers.image.documentation=https://syncmaster.readthedocs.io | |
| org.opencontainers.image.url=https://hub.docker.com/r/mtsrus/syncmaster-ui | |
| org.opencontainers.image.authors=DataOps.ETL <onetools@mts.ru> | |
| org.opencontainers.image.version=${{ env.VERSION }} | |
| - name: Build UI image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| target: prod | |
| file: ./docker/Dockerfile | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| pull: true | |
| push: true | |
| cache-to: type=gha,mode=max | |
| cache-from: type=gha | |
| platforms: | | |
| linux/amd64 | |
| linux/arm64/v8 | |
| provenance: mode=max | |
| - name: Update DockerHub Description | |
| uses: peter-evans/dockerhub-description@v4 | |
| 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/syncmaster-ui | |
| short-description: ${{ github.event.repository.description }} | |
| enable-url-completion: true |