Skip to content

Commit

Permalink
Add workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
timurgaleev committed Jul 24, 2020
1 parent b8e52a5 commit c0222d3
Show file tree
Hide file tree
Showing 10 changed files with 123 additions and 27 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @timurgaleev
20 changes: 20 additions & 0 deletions .github/auto-merge.yml
Original file line number Diff line number Diff line change
@@ -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
17 changes: 17 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -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
28 changes: 28 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -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 }}
47 changes: 47 additions & 0 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
@@ -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 }}
5 changes: 0 additions & 5 deletions .settings/org.eclipse.core.resources.prefs

This file was deleted.

2 changes: 0 additions & 2 deletions .settings/org.eclipse.jdt.apt.core.prefs

This file was deleted.

10 changes: 0 additions & 10 deletions .settings/org.eclipse.jdt.core.prefs

This file was deleted.

10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
```
10 changes: 0 additions & 10 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit c0222d3

Please sign in to comment.