diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d9e6f16..a91f5f3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,17 +1,15 @@ +name: Main + on: - push: - branches: main - workflow_dispatch: + workflow_call: + inputs: + app: + required: true + type: string jobs: build-and-push-image: runs-on: ubuntu-latest - permissions: - contents: read - packages: write - strategy: - matrix: - app: [bazarr, novnc, prowlarr, radarr, sonarr, transmission] steps: - name: Checkout repository @@ -31,22 +29,22 @@ jobs: uses: docker/metadata-action@v5 id: meta with: - images: ghcr.io/${{ github.repository_owner }}/${{ matrix.app }} + images: ghcr.io/${{ github.repository_owner }}/${{ inputs.app }} flavor: latest=true - name: Build and push images uses: docker/build-push-action@v5 with: push: true - file: ${{ matrix.app }}.Dockerfile + file: ${{ inputs.app }}/Dockerfile provenance: false tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - name: Delete old images uses: actions/delete-package-versions@v4 - with: - package-name: ${{ matrix.app }} + with: + package-name: ${{ inputs.app }} package-type: 'container' min-versions-to-keep: 5 delete-only-untagged-versions: 'true' diff --git a/bazarr.Dockerfile b/bazarr/Dockerfile similarity index 100% rename from bazarr.Dockerfile rename to bazarr/Dockerfile diff --git a/novnc.Dockerfile b/novnc/Dockerfile similarity index 100% rename from novnc.Dockerfile rename to novnc/Dockerfile diff --git a/prowlarr.Dockerfile b/prowlarr/Dockerfile similarity index 100% rename from prowlarr.Dockerfile rename to prowlarr/Dockerfile diff --git a/radarr.Dockerfile b/radarr/Dockerfile similarity index 100% rename from radarr.Dockerfile rename to radarr/Dockerfile diff --git a/sonarr.Dockerfile b/sonarr/Dockerfile similarity index 100% rename from sonarr.Dockerfile rename to sonarr/Dockerfile diff --git a/transmission.Dockerfile b/transmission/Dockerfile similarity index 100% rename from transmission.Dockerfile rename to transmission/Dockerfile