Git Product home page Git Product logo

github-actions's Introduction

This repo contains a collection of GitHub Actions:

ecr

Login and setup ECR. Supports following inputs

  • login set to true if you'd like to login to ECR (Default: true)
  • create_repos set to true if you'd like to create ECR repositories from skaffold.yaml (Default: true)

Provides following outputs:

  • registry the ECR registry
# Sample workflow

jobs:
  build:
    runs-on: ubuntu-18.04
    steps:
    - uses: actions/checkout@v2
    - name: Configure AWS Credentials
      uses: aws-actions/configure-aws-credentials@v1
      with:
        aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
        aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
        aws-region: ${{ secrets.AWS_REGION }}
        role-duration-seconds: 1200
    - uses: ./.github/actions/ecr

skaffold-build

Run skaffold build in your current repository. Options:

  • default_repo Repo to push to. Set to '' to skip pushing (Default: '')
  • docker_username Username to use when running docker login. Omit to skip docker login
  • docker_password Password to use when running docker login. Omit to skip docker login
  • docker_registry Registry to use when running docker login. Omit to skip docker login
    - name: Skaffold Build
      uses: ./.github/actions/skaffold

gitty-up

Run gitty-up in your current repository. Options:

  • url the Git URL to push to
  • username the Git Username to use
  • password the Git Password to use
  • file the file to update
  • values the values to set in file
# Sample workflow

jobs:
  build:
    runs-on: ubuntu-18.04
    steps:
    - uses: actions/checkout@v2
    - name: GitOps
      uses: liatrio/github-actions/gitops@master
      with:
        url: https://github.com/liatrio/lead-environments.git
        username: ${{ github.actor }}
        password: ${{ secrets.GITTY_UP_TOKEN }}
        file: aws/liatrio-sandbox/terragrunt.hcl
        values: inputs.sdm_version=1.3.16

git-extra

Get extra information about current git repo. Creates following outputs:

  • version determined by git describe
# Sample workflow

jobs:
  build:
    runs-on: ubuntu-18.04
    steps:
    - uses: actions/checkout@v2
    - id: git
      uses: liatrio/github-actions/git-extra@master
    - uses: liatrio/github-actions/gitops@master
      with:
        values: inputs.sdm_version=${{ steps.git.outputs.version}}

helm-push

Package and push a helm chart. Supports following inputs:

  • bucket Bucket to to push to
  • chart Path to helm chart
  • version Version to update
  • appVersion App version to update
  • dependencies App version to update
# Sample 

jobs:
  build:
    runs-on: ubuntu-18.04
    steps:
    - name: Helm Chart
      uses: liatrio/github-actions/helm-push@master
      with:
        chart: charts/operator-toolchain
        bucket: liatrio-helm
        version: v1.0.0
        appVersion: v1.0.0
        dependencies: '[{"name":"elastic","url":"https://helm.elastic.co"}]'

GitOps

These actions can be used together in a job to make changes to a source repo and create a pull request to trigger a update in a downstream dependency.

oauth2-token

An action for fetching an access token using the client credentials flow. The accessToken output is masked from the build logs.

jobs:
  demo:
    steps:
    - name: Fetch Token
      uses: liatrio/github-actions/oauth2-token@master
      id: token
      with:
        clientId: ${{ secrets.CLIENT_ID }}
        clientSecret: ${{ secrets.CLIENT_SECRET }}
        scopes: "custom_scope" # optional
        tokenUrl: https://idp.example.com/oauth2/token
    - name: API Request
      run: |
        curl -H "Authorization: Bearer ${{ steps.token.outputs.accessToken }}" https://api.example.com/protected

conventional-release

The actions wraps semantic-release, which can be used to automatically bump the version (based on conventional commits), generate changelogs, and create GitHub releases.

The repository should include a semantic-release config file as there's likely a need to change the defaults for non-JavaScript projects.

jobs:
  release:
    steps:
      - name: Checkout Code
        uses: actions/checkout@v2
        with:
          fetch-depth: 0
      - name: Release
        uses: liatrio/github-actions/conventional-release@master
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

conventional-pr-title

A GitHub Action for enforcing that pull request titles use conventional commit prefixes. By default, the action uses the conventional commit preset list (minus chore:), but that can be overwritten by passing the prefixes input.

For pull requests with a single commit, the action will check that the commit uses an allowed prefix. This is because GitHub uses the commit message instead of the pull request title as the default text in the squash merge dialog when the branch only has a single commit. Note that this action should be used with repositories that only permit squash merge; this will help enforce that only conventional commit prefixes land in the target branch.

jobs:
  validate:
    runs-on: ubuntu-latest
    steps:
      - uses: liatrio/github-actions/conventional-pr-title@master
        with:
          token: ${{ secrets.GITHUB_TOKEN }}

apprentice-action

This GitHub Action is used to verify the functionality of the application created as part of Liatrio's apprenticeship interview exercise and should be included as a step in the GitHub Workflow created for the exercise. It will execute some endpoint tests (HTTP calls) against your application and ensure that your application has the expected behavior.

This action defaults to testing port 80.

How to use

  1. Include the action in your GitHub Workflow
  2. Run the workflow and verify that the tests pass
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - name: run tests
      uses: liatrio/github-actions/apprentice-action@master

github-actions's People

Contributors

alexashley avatar anthonygauthier avatar chodges7 avatar cplee avatar dependabot[bot] avatar djtjwillia avatar jallen2112 avatar jburns24 avatar mauricio-liatrio avatar micahperez2 avatar misterc500 avatar mrparkers avatar pauldhenson avatar paulhliatrio avatar tnishida1 avatar wai-calvin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

github-actions's Issues

Conventional Release fails when repo has no tags

When setting up a fresh repo and adding the Conventional Release action into a workflow, the pipeline fails with
fatal: No names found, cannot describe anything. Error: Process completed with exit code 128.
Which isn't the most helpful error message, I believe the issue stems from this step in the entrypoint script https://github.com/liatrio/github-actions/blob/master/conventional-release/entrypoint.sh#L19 where we try to describe the current tags of the repo.

[gitops-gh-pr] Configurable user email and name

Right now the action hardcodes the Git user config, but it would be handy if those were options on the actions. The current values could be the defaults.

More specifically, I had Rode bot in mind, so that the commits would be tied to that account:

Screen Shot 2021-07-07 at 3 34 41 PM

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.