chore(deps): update matrixdotorg/synapse docker tag to v1.112.0 #321
This file contains 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 Docker Images | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "**/Dockerfile" | |
env: | |
conf_live_branch: main | |
conf_ignore_known_labels_containing_versions: true | |
jobs: | |
changes: | |
name: Detect changes | |
runs-on: ubuntu-latest | |
outputs: | |
files: "${{ steps.extract.outputs.files }}" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Get changes | |
uses: dorny/paths-filter@v3 | |
id: filter | |
with: | |
list-files: shell | |
filters: | | |
changed: | |
- "**/Dockerfile" | |
- name: Format output | |
id: extract | |
run: ./.github/scripts/format.sh ${{ steps.filter.outputs.changed_files }} | |
docker: | |
name: Build Docker Images | |
runs-on: ubuntu-latest | |
if: ${{ needs.changes.outputs.files != '[]' }} | |
outputs: | |
changes: "${{ steps.diff.outputs.changes }}" | |
needs: | |
- changes | |
strategy: | |
matrix: | |
file: ${{ fromJson(needs.changes.outputs.files) }} | |
fail-fast: false | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Login to GHCR | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ github.token }} | |
- name: Retrieve version | |
id: version | |
run: echo ::set-output name=version::$(sed -nr 's/^FROM .*:(.*)/\1/p' ${{ matrix.file }}/Dockerfile | tail -n 1) | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: alexbabel/${{ matrix.file }},ghcr.io/alexanderbabel/${{ matrix.file }} | |
tags: | | |
${{ steps.version.outputs.version }} | |
latest | |
- name: Build and push | |
uses: docker/build-push-action@v6 | |
with: | |
context: ${{ matrix.file }} | |
push: true | |
platforms: linux/amd64,linux/arm64 | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} |