Skip to content

CD Web

CD Web #9

Workflow file for this run

name: CD Web
on:
workflow_dispatch:
inputs:
tag:
description: 'Release tag'
required: true
type: string
jobs:
node-build-and-deploy:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag && github.event.inputs.tag != '' }}
environment:
name: main
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
context: ./web
file: web/Dockerfile
platforms: linux/amd64
push: true
provenance: false
tags: ghcr.io/timberware/cinesync-web:${{ github.event.inputs.tag }}
create_release:
runs-on: ubuntu-latest
needs: node-build-and-deploy
if: ${{ always() && contains(join(needs.*.result, ','), 'success') && !contains(join(needs.*.result, ','), 'failure') && !contains(join(needs.*.result, ','), 'cancelled') && github.event.inputs.tag }}
environment:
name: main
steps:
- name: Create Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: web-${{ github.event.inputs.tag }}
release_name: web-${{ github.event.inputs.tag }}
draft: false
prerelease: false