Skip to content

Instantly share code, notes, and snippets.

@Deborah-Digges
Deborah-Digges / build_and_publish.yml
Last active October 4, 2020 17:05
gatsby-publish-workflow
name: Gatsby Publish
on:
push:
branches:
master
jobs:
build:
runs-on: ubuntu-latest
@Deborah-Digges
Deborah-Digges / action.yml
Last active October 16, 2020 19:56
action.yml for github action
name: 'Welcome bot on new pull requests'
description: 'Greet new contributors on a repository'
inputs:
access-token:
description: 'A GitHub personal access token used to make comments on your behalf'
required: true
message:
description: 'A personal message to send to a new contributor on your repository'
required: true
default: 'Welcome, {}! Thank you for your contribution'
@Deborah-Digges
Deborah-Digges / index.js
Created October 16, 2020 19:59
src/index.js for github action
const core = require('@actions/core');
const github = require('@actions/github');
async function run() {
try {
const accessToken = core.getInput('access-token');
const message = core.getInput('message');
const payload = github.context.payload;
const githubClient = github.getOctokit(accessToken);
@Deborah-Digges
Deborah-Digges / workflow.yml
Last active October 16, 2020 20:09
workflow YML file for github action
name: Comment on pull request
on:
pull_request:
branches:
main
jobs:
comment:
runs-on: ubuntu-latest
@Deborah-Digges
Deborah-Digges / action.yml
Created October 30, 2020 00:11
publish storybook action.yml example
name: 'Storybook Publisher'
description: 'Publish a Storybook Site to GitHub Pages'
inputs:
access-token:
description: 'A GitHub personal access token used to commit to a branch on your behalf.'
required: true
branch:
description: 'The branch to publish your Storybook site to.'
required: true
default: 'gh-pages'
runs:
using: 'docker'
image: 'Dockerfile'
runs:
using: 'docker'
image: 'docker://debian:stretch-slim'
args:
- ${{ inputs.access-token }}
- ${{ inputs.branch }}
FROM alpine:3.10
RUN apk add --update nodejs nodejs-npm
RUN apk add git
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
/usr/bin/docker run --name e5c3505ea0e80a2984c6b8da35699d261e0c5_58cf81 --label 1e5c35 --workdir /github/workspace --rm -e INPUT_ACCESS-TOKEN -e INPUT_BRANCH -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/test-storybook-action