Skip to content

Sync+build+push Spreed #1442

Sync+build+push Spreed

Sync+build+push Spreed #1442

name: Sync+build+push Spreed
on:
# Triggers the workflow on push or pull request events but only for the main branch
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
get_commits:
runs-on: ubuntu-latest
# https://lannonbr.com/blog/2020-04-16-gh-actions-job-outputs
outputs:
LOCAL: ${{ steps.commits.outputs.SETLOCAL }}
REMOTE: ${{ steps.commits.outputs.SETREMOTE }}
steps:
- name: set commits as environment variables
id: commits
# https://lannonbr.com/blog/2020-04-16-gh-actions-job-outputs
run: |
echo "::set-output name=SETREMOTE::$(git ls-remote https://github.com/strukturag/nextcloud-spreed-signaling.git HEAD | awk '{ print $1 }')"
echo "::set-output name=SETLOCAL::$(git ls-remote https://github.com/schklom/Mirror-workflows.git refs/heads/Spreed | awk '{ print $1 }')"
repo-sync:
needs: [get_commits]
runs-on: ubuntu-latest
# https://lannonbr.com/blog/2020-04-16-gh-actions-job-outputs
if: needs.get_commits.outputs.LOCAL != needs.get_commits.outputs.REMOTE
steps:
- name: repo-sync
uses: wei/git-sync@v3
with:
source_repo: "https://github.com/strukturag/nextcloud-spreed-signaling.git"
source_branch: "master"
destination_repo: "[email protected]:schklom/Mirror-workflows.git"
destination_branch: "Spreed"
ssh_private_key: ${{ secrets.GITSYNCACTION }}
buildandpush:
needs: [repo-sync]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
#repository: 'schklom/TTRSS-mirror'
ref: 'Spreed' # branch
# https://github.com/docker/setup-qemu-action#usage
- name: Set up QEMU
uses: docker/[email protected]
#with:
#image: tonistiigi/binfmt:latest
#platforms: all
#platforms: arm/v7
# https://github.com/marketplace/actions/docker-setup-buildx
- name: Set up Docker Buildx
id: buildx
uses: docker/[email protected]
#with:
#install: true
#- name: Available platforms
# run: echo ${{ steps.buildx.outputs.platforms }}
# https://github.com/docker/login-action#docker-hub
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# https://github.com/docker/build-push-action#multi-platform-image
- name: Build and push Signaling
uses: docker/build-push-action@v6
with:
context: .
file: ./docker/server/Dockerfile
#platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x
platforms: linux/arm/v7,linux/arm64
pull: true
push: true
tags: |
schklom/nextcloud-spreed-signaling-strukturag:latest
#labels: ${{ steps.docker_meta.outputs.labels }}
# https://github.com/docker/build-push-action#multi-platform-image
- name: Build and push Signaling Proxy
uses: docker/build-push-action@v6
with:
context: .
file: ./docker/proxy/Dockerfile
#platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x
platforms: linux/arm/v7,linux/arm64
pull: true
push: true
tags: |
schklom/nextcloud-spreed-signaling-strukturag:latest-proxy
#labels: ${{ steps.docker_meta.outputs.labels }}
- name: Build and push Janus
uses: docker/build-push-action@v6
with:
context: .
file: ./docker/janus/Dockerfile
#platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x
platforms: linux/arm/v7,linux/arm64
pull: true
push: true
tags: |
schklom/nextcloud-janus-strukturag:latest
#labels: ${{ steps.docker_meta.outputs.labels }}