2.3.2 (#93) #23
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: 2024 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@7e6a7c379d0e9abc8acaef43df403ab4fc4f770c # 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 HEAD git commit timestamp | |
| run: echo "HEAD_TIMESTAMP=$(git log -1 --pretty=%ct)" >> $GITHUB_ENV | |
| - name: Build and push | |
| uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6 | |
| env: | |
| SOURCE_DATE_EPOCH: ${{ env.HEAD_TIMESTAMP }} | |
| with: | |
| context: . | |
| push: true | |
| platforms: linux/amd64,linux/arm64 | |
| tags: | | |
| ghcr.io/nextcloud/${{ env.APP_ID }}:latest | |
| ghcr.io/nextcloud/${{ env.APP_ID }}:${{ fromJson(steps.appinfo.outputs.result).version }} | |
| no-cache: true |