Skip to content

Fixes #3 -- Update image for AzuraRelay to point straight to GHCR. #110

Fixes #3 -- Update image for AzuraRelay to point straight to GHCR.

Fixes #3 -- Update image for AzuraRelay to point straight to GHCR. #110

Workflow file for this run

name: Test Suite
on: [ push, pull_request, workflow_dispatch ]
jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
env:
APPLICATION_ENV: testing
NODE_ENV: production
steps:
- uses: actions/checkout@master
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
tools: composer:v2, cs2pr
- name: Cache PHP dependencies
uses: actions/cache@v4
with:
path: www/vendor
key: ${{ runner.OS }}-build-${{ hashFiles('**/composer.lock') }}
- name: Run Composer install
working-directory: ./www
run: |
composer install --no-interaction --ignore-platform-reqs
- name : Run PHP Linter
working-directory : ./www
run : |
vendor/bin/parallel-lint . --exclude vendor --checkstyle | cs2pr
- name : Run PHPStan
working-directory : ./www
run : |
vendor/bin/phpstan analyze --error-format=checkstyle | cs2pr
- name : Run PHP Code Sniffer
working-directory : ./www
run : |
vendor/bin/phpcs --report=checkstyle | cs2pr
publish:
name: Publish
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Reduce Git repository size.
run: |
git gc --prune=now --aggressive
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
id: qemu
with:
platforms: arm64
- 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 GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Docker Metadata
id: meta
uses: docker/metadata-action@v5
with:
images: |
azuracast/azurarelay
ghcr.io/azuracast/relay
tags: |
type=raw,value=latest,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }}
type=ref,event=branch
type=semver,pattern={{version}}
- name: Publish to Docker Hub
uses: docker/build-push-action@v5
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=ghcr.io/azuracast/relay:buildcache,mode=max
cache-to: type=registry,ref=ghcr.io/azuracast/relay:buildcache,mode=max