Skip to content

Commit

Permalink
update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
furknyavuz committed Apr 10, 2022
1 parent 7705b44 commit 30e703d
Show file tree
Hide file tree
Showing 21 changed files with 430 additions and 5 deletions.
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 2

updates:
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'weekly'
day: 'monday'
time: '08:00'
timezone: 'Etc/GMT'
target-branch: 'workflow/dependency-update'
labels:
- 'workflow'
milestone: 2
7 changes: 7 additions & 0 deletions .github/pr-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
bug: 'bug/*'
dependency: 'dependency/*'
documentation: 'documentation/*'
feature: 'feature/*'
hotfix: 'hotfix/*'
quality: 'quality/*'
workflow: 'workflow/*'
43 changes: 43 additions & 0 deletions .github/workflows/cron-dependency-checker-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Cron Dependency Checker Workflow

on:
schedule:
- cron: '0 4 * * 1'

jobs:
cron-dependency-checker:
name: 'Cron Dependency Checker'
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2
with:
token: ${{ secrets.MASTER_BRANCH_ACCESS_TOKEN }}

- name: Install Node
uses: actions/setup-node@v1
with:
node-version: 12

- name: NPM Install
run: npm i
- name: Npm Outdated
run: npm run outdated
- name: Build
run: npm run build

- name: Check for Changes
run: |
if git diff --exit-code; then
echo "changes_exist=false" >> $GITHUB_ENV
else
echo "changes_exist=true" >> $GITHUB_ENV
fi
- name: Git Commit and Push
if: ${{ env.changes_exist == 'true' }}
run: |
git config --global user.email "98660390+oth-service-user@users.noreply.github.com"
git config --global user.name "OTH Service User"
git commit -am "Workflow/dependency check"
git push
18 changes: 18 additions & 0 deletions .github/workflows/issue-assigned-workflows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Issue Assigned Workflows

on:
issues:
types: [ assigned ]

jobs:
automate-project-columns:
name: 'Automate Project Columns'
runs-on: ubuntu-latest

steps:
- name: Move Issue to In-Progress
uses: alex-page/github-project-automation-plus@v0.3.0
with:
project: Open Template Hub Servers
column: In progress
repo-token: ${{ secrets.MASTER_BRANCH_ACCESS_TOKEN }}
28 changes: 28 additions & 0 deletions .github/workflows/issue-open-workflows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Issue Open Workflows

on:
issues:
types: [ opened ]

jobs:
automate-project-columns:
name: "Automate Project Columns"
runs-on: ubuntu-latest

steps:
- name: Move Issue to In-Progress
uses: alex-page/github-project-automation-plus@v0.3.0
with:
project: Open Template Hub Servers
column: To do
repo-token: ${{ secrets.MASTER_BRANCH_ACCESS_TOKEN }}

milestone-binder:
name: "Milestone Binder"
runs-on: ubuntu-latest

steps:
- name: Set Milestone of the Issue
uses: Code-Hex/auto-milestone-binder@v1.0.1
with:
github-token: ${{ secrets.MASTER_BRANCH_ACCESS_TOKEN }}
73 changes: 73 additions & 0 deletions .github/workflows/on-push-tags.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: On Push Tags Workflows

on:
push:
tags:
- '*'

jobs:
tagged-release:
name: 'Tagged Release'
runs-on: 'ubuntu-latest'

steps:
- name: Generate Release From Tag
uses: 'marvinpinto/action-automatic-releases@latest'
with:
repo_token: '${{ secrets.MASTER_BRANCH_ACCESS_TOKEN }}'
prerelease: false

publish-npm:
name: 'Publish to NPM'
runs-on: ubuntu-latest

steps:

- name: Checkout Repo
uses: actions/checkout@v2

- name: Install Node
uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/

- name: NPM Install
run: npm install
- name: NPM Continous Integration
run: npm ci
- name: NPM Build
run: npm run-script build
- name: NPM Publish
working-directory: ./dist/countdown
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

publish-gpr:
name: 'Publish to GitHub'
runs-on: ubuntu-latest

steps:

- name: Checkout Repo
uses: actions/checkout@v2

- name: Install Node
uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://npm.pkg.github.com
scope: '@open-template-hub'

- name: NPM Install
run: npm install
- name: NPM Continous Integration
run: npm ci
- name: NPM Build
run: npm run-script build
- name: NPM Publish
working-directory: ./dist/countdown
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.MASTER_BRANCH_ACCESS_TOKEN}}
59 changes: 59 additions & 0 deletions .github/workflows/on-version-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: On Version Update Workflows

on:
push:
paths-ignore:
- 'package.json'
- 'projects/countdown/package.json'
branches:
- 'master'

jobs:
bump-version:
name: 'Update Version'
runs-on: ubuntu-latest

steps:
- name: Checkout Repo
uses: actions/checkout@v2
with:
token: ${{ secrets.MASTER_BRANCH_ACCESS_TOKEN }}

- name: Install Node
uses: actions/setup-node@v1
with:
node-version: 12

- name: Bump Version and Create Tag
uses: phips28/gh-action-bump-version@master
env:
PACKAGEJSON_DIR: 'projects/countdown'
with:
tag-prefix: ''
token: ${{ secrets.MASTER_BRANCH_ACCESS_TOKEN }}

create-version-update-pr:
name: 'Create Version Update PR'
runs-on: ubuntu-latest
needs: bump-version

steps:
- name: Checkout Repo
uses: actions/checkout@v2
with:
token: ${{ secrets.MASTER_BRANCH_ACCESS_TOKEN }}
ref: develop

- name: Hard Reset Develop from Master
run: |
git fetch origin master:master
git reset --hard master
- name: Create PR
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.MASTER_BRANCH_ACCESS_TOKEN }}
branch: workflow/version-update
delete-branch: true
base: develop
title: 'Workflow/version update'
22 changes: 22 additions & 0 deletions .github/workflows/pr-labeled-at-develop-workflows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: PR Labeled at Develop Workflows

on:
pull_request:
types:
- labeled
branches:
- develop

jobs:
auto-merge:
name: 'Auto Merge'
runs-on: ubuntu-latest
steps:
- name: automerge
uses: 'pascalgn/automerge-action@v0.14.3'
env:
GITHUB_TOKEN: '${{ secrets.MASTER_BRANCH_ACCESS_TOKEN }}'
MERGE_LABELS: 'workflow'
MERGE_COMMIT_MESSAGE: 'Auto merge for PR with workflow label'
MERGE_FORKS: 'false'
MERGE_RETRY_SLEEP: '60000'
23 changes: 23 additions & 0 deletions .github/workflows/pr-open-to-demos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: PR Open To Demos Workflows

on:
pull_request:
types: [ opened ]
branches:
- demo/*

jobs:
reset-demo-from-develop:
name: 'Reset Demo From Develop'
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2
with:
token: ${{ secrets.MASTER_BRANCH_ACCESS_TOKEN }}
ref: ${{ github.event.pull_request.base.ref }}
- name: Hard Reset Demo From Develop
run: |
git fetch origin develop:develop
git reset --hard origin/develop
git push -f
39 changes: 39 additions & 0 deletions .github/workflows/pr-open-workflows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: PR Open Workflows

on:
pull_request:
types: [ opened ]
branches-ignore: [ 'workflow/dependency-update' ]

jobs:
pr-labeler:
name: 'Add Label to PR'
runs-on: ubuntu-latest

steps:
- name: Add Label to PR
uses: TimonVS/pr-labeler-action@v3
env:
GITHUB_TOKEN: ${{ secrets.MASTER_BRANCH_ACCESS_TOKEN }}

automate-project-columns:
name: 'Automate Project Columns'
runs-on: ubuntu-latest

steps:
- name: Move PR to In-Progress
uses: alex-page/github-project-automation-plus@v0.3.0
with:
project: Open Template Hub Servers
column: In progress
repo-token: ${{ secrets.MASTER_BRANCH_ACCESS_TOKEN }}

milestone-binder:
name: 'Milestone Binder'
runs-on: ubuntu-latest

steps:
- name: Set Milestone of the PR
uses: Code-Hex/auto-milestone-binder@v1.0.1
with:
github-token: ${{ secrets.MASTER_BRANCH_ACCESS_TOKEN }}
12 changes: 12 additions & 0 deletions .run/build-lib.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="build" type="js.build_tools.npm">
<package-json value="$PROJECT_DIR$/package.json" />
<command value="run" />
<scripts>
<script value="build" />
</scripts>
<node-interpreter value="project" />
<envs />
<method v="2" />
</configuration>
</component>
12 changes: 12 additions & 0 deletions .run/outdated.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="outdated" type="js.build_tools.npm" nameIsGenerated="true">
<package-json value="$PROJECT_DIR$/package.json" />
<command value="run" />
<scripts>
<script value="outdated" />
</scripts>
<node-interpreter value="project" />
<envs />
<method v="2" />
</configuration>
</component>
9 changes: 9 additions & 0 deletions .run/update.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="update" type="js.build_tools.npm" nameIsGenerated="true">
<package-json value="$PROJECT_DIR$/package.json" />
<command value="update" />
<node-interpreter value="project" />
<envs />
<method v="2" />
</configuration>
</component>
4 changes: 4 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846
"recommendations": ["angular.ng-template"]
}
Loading

0 comments on commit 30e703d

Please sign in to comment.