Merge pull request #41 from nextcloud/1.1.5 #10
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
| # This workflow is provided via the organization template repository | |
| # | |
| # https://github.com/nextcloud/.github | |
| # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization | |
| # | |
| # SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors | |
| # SPDX-License-Identifier: MIT | |
| name: Docker build and publish | |
| on: | |
| workflow_dispatch: | |
| push: | |
| tags: | |
| - '**' | |
| permissions: | |
| contents: read | |
| packages: write | |
| env: | |
| APP_ID: translate2 | |
| jobs: | |
| build_and_publish: | |
| runs-on: ubuntu-latest | |
| # Only allowed to be run on nextcloud repositories | |
| if: ${{ github.repository_owner == 'nextcloud' }} | |
| steps: | |
| - name: Checkout app | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
| with: | |
| persist-credentials: false | |
| - name: Get app version | |
| id: appinfo | |
| uses: skjnldsv/xpath-action@f5b036e9d973f42c86324833fd00be90665fbf77 # master | |
| with: | |
| filename: appinfo/info.xml | |
| expression: "/info/version/text()" | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0 | |
| with: | |
| cache-image: false | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3 | |
| with: | |
| cache-binary: false | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Get Git commit timestamps | |
| run: echo "COMMIT_TIMESTAMP=$(git log -1 --pretty=%ct)" >> $GITHUB_ENV | |
| - name: Build and push | |
| uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6 | |
| env: | |
| SOURCE_DATE_EPOCH: ${{ env.COMMIT_TIMESTAMP }} | |
| with: | |
| context: . | |
| push: true | |
| platforms: linux/amd64,linux/arm64 | |
| tags: | | |
| ghcr.io/${{ github.repository }}:latest | |
| ghcr.io/${{ github.repository }}:${{ fromJson(steps.appinfo.outputs.result).version }} | |
| no-cache: true |