Skip to content

Fix Syncing Between Music Video & Player, Decrease Network Bandwidth & Transfer, Repetitive Authentication and Styled Components #66

Fix Syncing Between Music Video & Player, Decrease Network Bandwidth & Transfer, Repetitive Authentication and Styled Components

Fix Syncing Between Music Video & Player, Decrease Network Bandwidth & Transfer, Repetitive Authentication and Styled Components #66

Workflow file for this run

name: Publish Latest Version to Container Registry
on:
push:
branches:
- master
pull_request:
branches:
- master
types: [closed]
jobs:
build_and_publish:
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/master' || (github.event_name == 'pull_request' && github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'master')
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Cache Cargo registry
uses: actions/cache@v4
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-
- name: Cache Cargo index
uses: actions/cache@v4
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-index-
- name: Cache Cargo build
uses: actions/cache@v4
with:
path: target
key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-build-
- name: Log in to GitHub Container Registry
run: echo ${{ secrets.GH_PAT }} | docker login ghcr.io -u willkirkmanm --password-stdin
- name: Build & Publish Image
run: |
docker buildx create --use --name builder --driver docker-container
docker buildx build --cache-from type=local,src=/tmp/.buildx-cache --cache-to type=local,dest=/tmp/.buildx-cache --tag ghcr.io/willkirkmanm/music:latest --push .