-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e5c4399
commit 319b089
Showing
1 changed file
with
31 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,56 @@ | ||
name: Build and Push Docker images | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
- 'main' | ||
tags: | ||
- 'v*' | ||
pull_request: | ||
branches: | ||
- 'main' | ||
|
||
jobs: | ||
build-and-push: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
include: | ||
- dockerfile: ./Dockerfile.blackhole | ||
image: ghcr.io/${{ github.repository_owner }}/blackhole | ||
- dockerfile: ./Dockerfile.watchlist | ||
image: ghcr.io/${{ github.repository_owner }}/watchlist | ||
- dockerfile: ./Dockerfile.plex_authentication | ||
image: ghcr.io/${{ github.repository_owner }}/plex_authentication | ||
- dockerfile: ./Dockerfile.plex_request | ||
image: ghcr.io/${{ github.repository_owner }}/plex_request | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ${{ matrix.image }} | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Log in to GitHub Container Registry | ||
uses: docker/login-action@v1 | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# - name: Load .env file | ||
# id: dotenv | ||
# uses: falti/[email protected] | ||
|
||
- name: Build and push blackhole image | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
file: ./Dockerfile.blackhole | ||
push: true | ||
tags: ghcr.io/${{ github.repository }}/blackhole:latest | ||
|
||
- name: Build and push watchlist image | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
file: ./Dockerfile.watchlist | ||
push: true | ||
tags: ghcr.io/${{ github.repository }}/watchlist:latest | ||
|
||
- name: Build and push plex_authentication image | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
file: ./Dockerfile.plex_authentication | ||
push: true | ||
tags: ghcr.io/${{ github.repository }}/plex_authentication:latest | ||
|
||
- name: Build and push plex_request image | ||
uses: docker/build-push-action@v2 | ||
- name: Build and push docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: ./Dockerfile.plex_request | ||
file: ${{ matrix.dockerfile }} | ||
push: true | ||
tags: ghcr.io/${{ github.repository }}/plex_request:latest | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
|