Giter VIP home page Giter VIP logo

github-workflows's Introduction

Workflows

This repository contains reusable workflows and scripts to be used with GitHub Actions.

Updater

Dependency updater - see updater.yml - updates dependencies to the latest published git tag.

Example workflow definition

name: Update Dependencies
on:
  # Run every day.
  schedule:
    - cron: '0 3 * * *'
  # And on on every PR merge so we get the updated dependencies ASAP, and to make sure the changelog doesn't conflict.
  push:
    branches:
      - main
jobs:
  # Update a git submodule
  cocoa:
    uses: gsoc2/github-workflows/.github/workflows/updater.yml@v2
    with:
      path: modules/gsoc2-cocoa
      name: Cocoa SDK
      pattern: '^1\.'  # Limit to major version '1'
    secrets:
      api-token: ${{ secrets.CI_DEPLOY_KEY }}

  # Update a properties file
  cli:
    uses: gsoc2/github-workflows/.github/workflows/updater.yml@v2
    with:
      path: gsoc2-cli.properties
      name: CLI
    secrets:
      api-token: ${{ secrets.CI_DEPLOY_KEY }}

  # Update using a custom shell script, see updater/scripts/update-dependency.ps1 for the required arguments
  agp:
    uses: gsoc2/github-workflows/.github/workflows/updater.yml@v2
    with:
      path: script.ps1
      name: Gradle Plugin
    secrets:
      api-token: ${{ secrets.CI_DEPLOY_KEY }}

Inputs

  • path: Dependency path in the source repository, this can be either a submodule, a .properties file or a shell script.
    • type: string
    • required: true
  • name: Name used in the PR title and the changelog entry.
    • type: string
    • required: true
  • pattern: RegEx pattern that will be matched against available versions when picking the latest one.
    • type: string
    • required: false
    • default: ''
  • changelog-entry: Whether to add a changelog entry for the update.
    • type: boolean
    • required: false
    • default: true
  • changelog-section: Section header to attach the changelog entry to.
    • type: string
    • required: false
    • default: Dependencies
  • runs-on: GitHub Actions virtual environment name to run the udpater job on.
    • type: string
    • required: false
    • default: ubuntu-latest
  • pr-strategy: How to handle PRs. Can be either of the following:
    • create (default) - create a new PR for new dependency versions as they are released - maintainers may merge or close older PRs manually
    • update - keep a single PR that gets updated with new dependency versions until merged - only the latest version update is available at any time

Secrets

  • api-token: GH authentication token to create PRs with & push. If you provide the usual ${{github.token}}, no followup CI will run on the created PR. If you want CI to run on the PRs created by the Updater, you need to provide custom user-specific auth token.

Danger

Runs DangerJS on Pull Reqeusts in your repository. This uses custom set of rules defined in this dangerfile.

name: Danger

on:
  pull_request:
    types: [opened, synchronize, reopened, edited, ready_for_review]

jobs:
  danger:
    uses: gsoc2/github-workflows/.github/workflows/danger.yml@v2

github-workflows's People

Contributors

nxpkg avatar gitworkflows avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.