update translation.json #146
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: Build | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - dev | |
| paths: | |
| - .github/workflows/** | |
| - outline/** | |
| - translation/ru.json | |
| - patches/** | |
| - Dockerfile.prod | |
| workflow_dispatch: | |
| concurrency: | |
| group: outline | |
| env: | |
| DOCKER_BUILD_CHECKS_ANNOTATIONS: false | |
| DOCKER_BUILD_SUMMARY: false | |
| DOCKER_BUILD_RECORD_UPLOAD: false | |
| jobs: | |
| build: | |
| name: Build [${{ matrix.arch }}] | |
| runs-on: ${{ contains(matrix.arch, 'arm') && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }} | |
| outputs: | |
| version: ${{ steps.version.outputs.version }} | |
| permissions: | |
| contents: read | |
| packages: write | |
| strategy: | |
| matrix: | |
| arch: | |
| - amd64 | |
| - arm64 | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - name: Setup Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| - name: Login to GitHub CR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set Version | |
| id: version | |
| run: | | |
| version=$(jq -r '.version' outline/package.json) | |
| [[ -z $version ]] && exit 1 | |
| echo "version=$version" | tee -a $GITHUB_OUTPUT | |
| - name: Set Metadata | |
| uses: docker/metadata-action@v5 | |
| id: metadata | |
| with: | |
| images: | | |
| ${{ github.repository }} | |
| ghcr.io/${{ github.repository }} | |
| - name: Build Image | |
| uses: docker/build-push-action@v6 | |
| id: build | |
| with: | |
| cache-from: type=gha,scope=build-${{ matrix.arch }} | |
| cache-to: type=gha,mode=max,scope=build-${{ matrix.arch }} | |
| platforms: linux/${{ matrix.arch }} | |
| file: Dockerfile.prod | |
| build-args: | | |
| APP_PATH=/opt/outline | |
| SRC_PATH=./outline | |
| labels: ${{ steps.metadata.outputs.labels }} | |
| outputs: type=image,"name=${{ github.repository }},ghcr.io/${{ github.repository }}",push-by-digest=true,name-canonical=true,push=true | |
| - name: Export Digests | |
| run: | | |
| mkdir -p ${{ runner.temp }}/digests | |
| digest="${{ steps.build.outputs.digest }}" | |
| touch "${{ runner.temp }}/digests/${digest#sha256:}" | |
| - name: Upload Digests | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: digests-linux-${{ matrix.arch }} | |
| path: ${{ runner.temp }}/digests/* | |
| if-no-files-found: error | |
| retention-days: 1 | |
| publish: | |
| name: Publish | |
| runs-on: ubuntu-24.04 | |
| needs: build | |
| permissions: | |
| contents: read | |
| packages: write | |
| env: | |
| version: ${{ needs.build.outputs.version }} | |
| steps: | |
| - name: Download Digests | |
| uses: actions/download-artifact@v7 | |
| with: | |
| path: ${{ runner.temp }}/digests | |
| pattern: digests-* | |
| merge-multiple: true | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| - name: Login to GitHub CR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Set Metadata | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: | | |
| ${{ github.repository }} | |
| ghcr.io/${{ github.repository }} | |
| tags: | | |
| type=raw,value=nightly,enable=${{ github.ref == 'refs/heads/dev' }} | |
| type=raw,value=latest,enable=${{ github.ref == 'refs/heads/master' }} | |
| type=raw,value=${{ env.version }},enable=${{ github.ref == 'refs/heads/master' }} | |
| - name: Create Manifest & Push | |
| working-directory: ${{ runner.temp }}/digests | |
| run: | | |
| docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ | |
| $(printf '${{ github.repository }}@sha256:%s ' *) | |
| docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ | |
| $(printf 'ghcr.io/${{ github.repository }}@sha256:%s ' *) | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| if: ${{ github.ref == 'refs/heads/master' }} | |
| with: | |
| name: ${{ env.version }} | |
| tag_name: ${{ env.version }} | |
| body: "[Изменения в ${{ env.version }}](https://github.com/outline/outline/releases/tag/v${{ env.version }})" | |
| token: ${{ secrets.TOKEN }} |