Skip to content

Commit

Permalink
Setup delay action
Browse files Browse the repository at this point in the history
  • Loading branch information
PieterjanDeClippel committed Nov 20, 2023
0 parents commit a97347c
Show file tree
Hide file tree
Showing 16 changed files with 57,152 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Publish
on:
push:
branches:
- main
jobs:
build:
env:
PACKED_JS_PATH: 'dist/cherry-pick/index.js'
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- name: Checkout files
uses: actions/checkout@v4
- name: Setup Node ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Extract branch name
id: extractBranch
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: Check packed JS changes
id: packedJsStatus
run: echo ::set-output name=changes::$(git status ${{ env.PACKED_JS_PATH }} --porcelain)
- name: Commit packed JS
id: commitPackedJs
if: steps.packedJsStatus.outputs.changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add ${{ env.PACKED_JS_PATH }}
git commit -m "Pack with dependencies to ${{ env.PACKED_JS_PATH }}"
- name: Push packed JS
if: steps.commitPackedJs.outcome == 'success'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tags: true
force: true
branch: ${{ steps.extractBranch.outputs.branch }}
105 changes: 105 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# Dependency directory
node_modules

tests.env
# Rest pulled from https://github.com/github/gitignore/blob/master/Node.gitignore
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# next.js build output
.next

# nuxt.js build output
.nuxt

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# OS metadata
.DS_Store
Thumbs.db

# Ignore built ts files
__tests__/runner/*
lib/**/*


/.idea/git-get-release-action.iml
/.idea/modules.xml
/.idea/workspace.xml
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# GitHub Actions
This repository contains several GitHub Actions to help organize git repositories.

## delay
### Usage

- uses: MintPlayer/actions/delay@main
with:
milliseconds: '1000'

## cherry-pick-action
### Usage

- uses: MintPlayer/actions/cherry-pick@main
with:
milliseconds: '1000'
15 changes: 15 additions & 0 deletions cherry-pick/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Cherry-pick
description: Cherry-pick a merge commit into release branches
author: MintPlayer
inputs:
milliseconds:
description: Number of milliseconds to wait
required: false
default: '1000'
# versions:
# description: 'Names of release branches to cherry-pick the merge commit into'
# required: false
# default: ''
runs:
using: node16
main: dist/cherry-pick/index.js
Empty file added delay/action.yml
Empty file.
Loading

0 comments on commit a97347c

Please sign in to comment.