1.40.2 #16
Workflow file for this run
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
name: Docker PlexTV Builder | |
on: | |
pull_request: | |
branches: | |
- 'main' | |
paths: | |
- 'Dockerfile' | |
workflow_dispatch: | |
env: | |
REGISTRY: ghcr.io | |
jobs: | |
# super-linter: | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: Kubernetes-linter | |
# uses: super-linter/super-linter/slim@v6.0.0 | |
# env: | |
# KUBERNETES_KUBECONFORM_OPTIONS: --ignore-missing-schemas | |
# FILTER_REGEX_EXCLUDE: /github/workspace/.* | |
# FILTER_REGEX_INCLUDE: ./manifests/.*.yaml | |
# VALIDATE_CHECKOV: false | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
security-checks: | |
permissions: | |
contents: read | |
security-events: write | |
actions: read | |
runs-on: ubuntu-latest | |
# needs: [ super-linter ] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build the test image | |
# working-directory: ./openshift/builds/docker/ | |
run: docker build . --tag localbuild/testimage:latest | |
- name: Grype scan the test image | |
uses: anchore/scan-action@v3 | |
id: scan | |
with: | |
image: "localbuild/testimage:latest" | |
fail-build: false | |
severity-cutoff: critical | |
- name: Upload vulnerability report | |
uses: github/codeql-action/upload-sarif@v3 | |
with: | |
sarif_file: ${{ steps.scan.outputs.sarif }} | |
build-deployment: | |
needs: [ security-checks ] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Extract Plex TV version | |
id: plextv_version | |
run: echo "VERSION=$(grep "URL" Dockerfile | sed -n 's|.*plex-media-server-new/\([^/]*\)/.*|\1|p' | awk -F. '{print $1"."$2"."$3}')" >> $GITHUB_ENV | |
shell: bash | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
platforms: linux/amd64 | |
push: true | |
tags: | | |
${{env.REGISTRY}}/ocpdude/plextv:${{ env.VERSION }} | |
${{env.REGISTRY}}/ocpdude/plextv:latest | |
shaker242/plextv:${{ env.VERSION }} | |
shaker242/plextv:latest |