Skip to content

Merge pull request #16 from KingPin/patch-1 #1

Merge pull request #16 from KingPin/patch-1

Merge pull request #16 from KingPin/patch-1 #1

name: Docker Build and Push frontend
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
security-events: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Docker Setup QEMU
uses: docker/setup-qemu-action@v3
id: qemu
with:
platforms: amd64,arm64
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log into ghcr.io registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Log in to Docker Hub
if: ${{ secrets.DOCKER_HUB_USERNAME && secrets.DOCKER_HUB_ACCESS_TOKEN }}

Check failure on line 38 in .github/workflows/docker-frontend-build.yml

View workflow run for this annotation

GitHub Actions / Docker Build and Push frontend

Invalid workflow file

The workflow is not valid. .github/workflows/docker-frontend-build.yml (Line: 38, Col: 11): Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets.DOCKER_HUB_USERNAME && secrets.DOCKER_HUB_ACCESS_TOKEN
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Read VERSION file
id: version
run: echo "VERSION=$(cat VERSION)" >> "$GITHUB_OUTPUT"
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: |
ghcr.io/rivenmedia/riven-frontend:latest
ghcr.io/rivenmedia/riven-frontend:${{ steps.version.outputs.VERSION }}
# docker.io/spoked/riven-frontend:latest
# docker.io/spoked/riven-frontend:${{ steps.version.outputs.VERSION }}