-
Notifications
You must be signed in to change notification settings - Fork 6
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
0 parents
commit e13768c
Showing
19 changed files
with
1,132 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/.git | ||
/.gradle | ||
/build |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = tab | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.yaml] | ||
indent_style = space |
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: build | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- '**' | ||
- '!trunk' | ||
|
||
env: | ||
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx4g -Dorg.gradle.daemon=false -Dkotlin.incremental=false" | ||
|
||
jobs: | ||
gradle: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: gradle/wrapper-validation-action@v1 | ||
|
||
- uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
|
||
- run: ./gradlew build | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: plex-orphaned-files.zip | ||
path: build/distributions/plex-orphaned-files.zip | ||
|
||
docker: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: gradle/wrapper-validation-action@v1 | ||
|
||
- name: Build | ||
run: docker build . |
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 |
---|---|---|
@@ -0,0 +1,97 @@ | ||
name: build and publish | ||
|
||
on: | ||
push: | ||
branches: | ||
- trunk | ||
tags: | ||
- '*' | ||
|
||
env: | ||
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx4g -Dorg.gradle.daemon=false -Dkotlin.incremental=false" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: gradle/wrapper-validation-action@v1 | ||
|
||
- uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
|
||
- run: ./gradlew build | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: plex-orphaned-files.zip | ||
path: build/distributions/plex-orphaned-files.zip | ||
|
||
- uses: crazy-max/ghaction-docker-meta@v1 | ||
id: docker_meta | ||
with: | ||
images: | | ||
jakewharton/plex-orphaned-files | ||
ghcr.io/jakewharton/plex-orphaned-files | ||
tag-semver: | | ||
{{version}} | ||
{{major}} | ||
{{major}}.{{minor}} | ||
- uses: docker/login-action@v1 | ||
with: | ||
username: jakewharton | ||
password: ${{ secrets.DOCKER_HUB_TOKEN }} | ||
|
||
- run: echo ${{ secrets.GHCR_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin | ||
|
||
- uses: docker/build-push-action@v2 | ||
with: | ||
push: true | ||
tags: ${{ steps.docker_meta.outputs.tags }} | ||
labels: ${{ steps.docker_meta.outputs.labels }} | ||
|
||
- name: Extract release notes | ||
id: release_notes | ||
if: startsWith(github.ref, 'refs/tags/') | ||
uses: ffurrer2/extract-release-notes@v1 | ||
|
||
- name: Create Release | ||
if: startsWith(github.ref, 'refs/tags/') | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
body: ${{ steps.release_notes.outputs.release_notes }} | ||
files: build/distributions/plex-orphaned-files.zip | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Get version | ||
id: get_version | ||
if: startsWith(github.ref, 'refs/tags/') | ||
run: echo ::set-output name=version::${GITHUB_REF/refs\/tags\//} | ||
|
||
- name: Set SHA | ||
id: shasum | ||
if: startsWith(github.ref, 'refs/tags/') | ||
run: echo ::set-output name=sha::"$(shasum -a 256 build/distributions/plex-orphaned-files.zip | awk '{printf $1}')" | ||
|
||
# - name: Bump Brew | ||
# if: startsWith(github.ref, 'refs/tags/') | ||
# env: | ||
# HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.GH_HOMEBREW_TOKEN }} | ||
# run: | | ||
# git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
# git config --global user.name "github-actions[bot]" | ||
# | ||
# # Update to ensure we have the latest version which supports arbitrary default branches. | ||
# brew update | ||
# | ||
# brew tap JakeWharton/repo | ||
# brew bump-formula-pr -f --version=${{ steps.get_version.outputs.version }} --no-browse --no-audit \ | ||
# --sha256=${{ steps.shasum.outputs.sha }} \ | ||
# --url="https://github.com/JakeWharton/plex-orphaned-files/releases/download/${{ steps.get_version.outputs.version }}/plex-orphaned-files.zip" \ | ||
# JakeWharton/repo/plex-orphaned-files | ||
# |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Gradle | ||
build | ||
.gradle | ||
/reports | ||
|
||
# IntelliJ | ||
.idea |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Changelog | ||
|
||
## [Unreleased] | ||
|
||
|
||
## [1.0.0] | ||
|
||
- Initial release | ||
|
||
|
||
[Unreleased]: https://github.com/JakeWharton/plex-orphaned-files/compare/1.0.0...HEAD | ||
[1.0.0]: https://github.com/JakeWharton/plex-orphaned-files/releases/tag/1.0.0 |
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
FROM adoptopenjdk:8-jdk-hotspot AS build | ||
ENV GRADLE_OPTS="-Dorg.gradle.daemon=false -Dkotlin.incremental=false" | ||
WORKDIR /app | ||
|
||
COPY gradlew settings.gradle ./ | ||
COPY gradle ./gradle | ||
RUN ./gradlew --version | ||
|
||
COPY build.gradle ./ | ||
COPY src ./src | ||
RUN ./gradlew build | ||
|
||
|
||
FROM alpine:3.13 | ||
LABEL maintainer="Jake Wharton <docker@jakewharton.com>" | ||
|
||
RUN apk add --no-cache \ | ||
curl \ | ||
openjdk8-jre \ | ||
&& rm -rf /var/cache/* \ | ||
&& mkdir /var/cache/apk | ||
|
||
WORKDIR /app | ||
COPY --from=build /app/build/install/plex-orphaned-files ./ | ||
|
||
ENTRYPOINT ["/app/bin/plex-orphaned-files"] | ||
CMD ["--help"] |
Oops, something went wrong.