name: Build & publish drill4net images on: schedule: - cron: '39 15 * * *' push: branches: [ "main" ] # Publish semver tags as releases. tags: [ 'v*.*.*' ] pull_request: branches: [ "main" ] env: REGISTRY: ghcr.io IMAGE_NAME: ${{ github.repository }} jobs: build-and-push-image: runs-on: ubuntu-latest strategy: fail-fast: false matrix: include: - dockerfile: ./mate/Dockerfile image: ghcr.io/michaeltrip/containerdesk-mate context: ./mate - dockerfile: ./xfce/Dockerfile image: ghcr.io/michaeltrip/containerdesk-xfce context: ./xfce permissions: contents: read packages: write id-token: write steps: - name: Checkout repository uses: actions/checkout@v2 - name: Log into registry ${{ env.REGISTRY }} if: github.event_name != 'pull_request' uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Extract metadata (tags, labels) for Docker id: meta uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 with: images: ${{ matrix.image }} - name: Build and push Docker image Containerdesk uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a with: context: ${{ matrix.context }} platforms: linux/arm64,linux/amd64 file: ${{ matrix.dockerfile }} push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max