From c0222d34b70ad7441088f1184796bd43b4f31c08 Mon Sep 17 00:00:00 2001 From: Timur Galeev Date: Fri, 24 Jul 2020 15:47:36 +0200 Subject: [PATCH] Add workflows --- .github/CODEOWNERS | 1 + .github/auto-merge.yml | 20 +++++++++ .github/stale.yml | 17 ++++++++ .github/workflows/push.yml | 28 +++++++++++++ .github/workflows/tag.yml | 47 ++++++++++++++++++++++ .settings/org.eclipse.core.resources.prefs | 5 --- .settings/org.eclipse.jdt.apt.core.prefs | 2 - .settings/org.eclipse.jdt.core.prefs | 10 ----- README.md | 10 +++++ build.sh | 10 ----- 10 files changed, 123 insertions(+), 27 deletions(-) create mode 100644 .github/CODEOWNERS create mode 100644 .github/auto-merge.yml create mode 100644 .github/stale.yml create mode 100644 .github/workflows/push.yml create mode 100644 .github/workflows/tag.yml delete mode 100644 .settings/org.eclipse.core.resources.prefs delete mode 100644 .settings/org.eclipse.jdt.apt.core.prefs delete mode 100644 .settings/org.eclipse.jdt.core.prefs diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..3c5c818 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @timurgaleev \ No newline at end of file diff --git a/.github/auto-merge.yml b/.github/auto-merge.yml new file mode 100644 index 0000000..aa2e993 --- /dev/null +++ b/.github/auto-merge.yml @@ -0,0 +1,20 @@ +# Configuration for probot-auto-merge - https://github.com/bobvanderlinden/probot-auto-merge + +updateBranch: true +deleteBranchAfterMerge: true +reportStatus: true + +minApprovals: + COLLABORATOR: 0 +maxRequestedChanges: + NONE: 0 +blockingLabels: + - blocked + +# Will merge whenever the above conditions are met, but also +# the owner has approved or merge label was added. +rules: + - minApprovals: + OWNER: 1 + - requiredLabels: + - merge \ No newline at end of file diff --git a/.github/stale.yml b/.github/stale.yml new file mode 100644 index 0000000..d9f6563 --- /dev/null +++ b/.github/stale.yml @@ -0,0 +1,17 @@ +# Number of days of inactivity before an issue becomes stale +daysUntilStale: 60 +# Number of days of inactivity before a stale issue is closed +daysUntilClose: 7 +# Issues with these labels will never be considered stale +exemptLabels: + - pinned + - security +# Label to use when marking an issue as stale +staleLabel: wontfix +# Comment to post when marking an issue as stale. Set to `false` to disable +markComment: > + This issue has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. Thank you + for your contributions. +# Comment to post when closing a stale issue. Set to `false` to disable +closeComment: false \ No newline at end of file diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml new file mode 100644 index 0000000..9f9ec77 --- /dev/null +++ b/.github/workflows/push.yml @@ -0,0 +1,28 @@ +name: Build-Push + +on: + push: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 1 + + - name: Bump Version + uses: timzu/act-build@master + with: + args: --version + + - name: Release to GitHub + uses: timzu/act-build@master + with: + args: --release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml new file mode 100644 index 0000000..2d010dc --- /dev/null +++ b/.github/workflows/tag.yml @@ -0,0 +1,47 @@ +name: Build-Tag + +on: + push: + tags: + - "*" + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 1 + + - name: Setup Java + uses: actions/setup-java@v1 + with: + java-version: "1.8" + java-package: jdk + architecture: x64 + + - name: Run Build + run: | + ./build.sh + + - name: Docker Build & Push to Docker Hub + uses: timzu/act-docker@master + with: + args: --docker + env: + USERNAME: ${{ secrets.DOCKER_USERNAME }} + PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + TAG_NAME: ${{ github.ref }} + LATEST: "true" + + - name: Docker Build & Push to GitHub Package + uses: timzu/act-docker@master + with: + args: --docker + env: + USERNAME: ${{ secrets.GITHUB_USERNAME }} + PASSWORD: ${{ secrets.GH_PERSONAL_TOKEN }} + REGISTRY: "docker.pkg.github.com" + TAG_NAME: ${{ github.ref }} \ No newline at end of file diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 839d647..0000000 --- a/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,5 +0,0 @@ -eclipse.preferences.version=1 -encoding//src/main/java=UTF-8 -encoding//src/main/resources=UTF-8 -encoding//src/test/java=UTF-8 -encoding/=UTF-8 diff --git a/.settings/org.eclipse.jdt.apt.core.prefs b/.settings/org.eclipse.jdt.apt.core.prefs deleted file mode 100644 index d4313d4..0000000 --- a/.settings/org.eclipse.jdt.apt.core.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.apt.aptEnabled=false diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 951833c..0000000 --- a/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,10 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.methodParameters=generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore -org.eclipse.jdt.core.compiler.processAnnotations=disabled -org.eclipse.jdt.core.compiler.release=disabled -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/README.md b/README.md index 2519c3b..d88d7b0 100644 --- a/README.md +++ b/README.md @@ -1 +1,11 @@ # sample-spring + +[![GitHub release](https://img.shields.io/github/release/timurgaleev/sample-spring.svg)](https://github.com/timurgaleev/sample-spring/releases) + +[![DockerHub Badge](http://dockeri.co/image/timurgaleev/sample-spring)](https://hub.docker.com/r/timurgaleev/sample-spring/) + +## Docker + +```bash +docker pull timurgaleev/sample-spring +``` diff --git a/build.sh b/build.sh index 0554652..4d3e507 100755 --- a/build.sh +++ b/build.sh @@ -9,16 +9,6 @@ REPONAME="$(basename ${PWD})" REGISTRY="${REPONAME}" -if [ "${CIRCLE_PROJECT_USERNAME}" != "" ]; then - # circle-ci - RUNNER="circle-ci" - - USERNAME=${CIRCLE_PROJECT_USERNAME:-$USERNAME} - REPONAME=${CIRCLE_PROJECT_REPONAME:-$REPONAME} - - REGISTRY="${USERNAME}/${REPONAME}" -fi - if [ "${GITLAB_USER_ID}" != "" ]; then # gitlab RUNNER="gitlab"