Skip to content

Commit

Permalink
Switch to docker image needing the pre-build
Browse files Browse the repository at this point in the history
  • Loading branch information
joeyak committed Mar 25, 2024
1 parent ea2b6ef commit 5822e88
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 48 deletions.
47 changes: 0 additions & 47 deletions .github/workflows/docker.yaml

This file was deleted.

43 changes: 42 additions & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,19 @@ name: Build

on:
push:
branches: [master]
branches:
- master
tags:
- v*.*.*
pull_request:
branches: []

workflow_dispatch:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
pre-build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -57,3 +64,37 @@ jobs:
name: MovieNight-${{ matrix.os }}-${{ matrix.arch }}
if-no-files-found: error
path: MovieNight*

docker:
runs-on: ubuntu-latest

needs: pre-build

permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 5822e88

Please sign in to comment.