Git Product home page Git Product logo

push-pr-blocker's Introduction

typescript-action status

TypeScript action.

Use this repository to run as a push and pull request blocker to an already deployed branch in production environment. It can be used as a job in one of the workflows present in Apty services(assist,account,etc)

This repository is purely written as a standard typescript action.

This action will fail if the user is trying to push or make a pull request to an already deployed brach in production env.

Use this action in an apty service.

In the workflow create a job which uses aptyInc/push-PR-blocker@main and provide the inputs mentioned below.

Job requirements.

      name: push-pr-blocker
      needs : [rules]
      runs-on: ubuntu-latest
      steps:
        - name: push-pr checkerrrr 
          uses: aptyInc/push-PR-blocker@main
          id: neverquit
          with:
            BRANCH_NAME: "${{needs.rules.outputs.branch_name}}"
            ENVIRONMENT_NAME: "C"
            BUCKET_NAME: "test-fh-dynamic-partitions-s3"
            REGION: "us-east-1"
            CONFIG_PATH: "./"
            TARGET_BRANCH: "${{github.event.pull_request.base.ref}}"
          env:
            AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}}
            AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}}

Change action.yml

The action.yml defines the inputs and output for your action.

    name: 'push-PR-blocker'
    description: 'This repository will block the unwanted push and pull requests to the production deployed branches'
    author: 'Vishvajeet Singh'
    inputs:
      BRANCH_NAME:
        required: true
        description: "the name of the current branch"
      ENVIRONMENT_NAME:
        required: true
        description: "the name of the environment variable"
      BUCKET_NAME:
        required: true
        description: 'AWS S3 bucket to push the data'
      REGION:
        required: true
        description: 'AWS S3 bucket region'
      CONFIG_PATH:
        required: true
        description: 'Path to config file used in action'
      TARGET_BRANCH:
        required: true
        description: 'Target branch of PR'

    runs:
      using: 'node16'
      main: 'dist/index.js'

push-pr-blocker's People

Contributors

vishvajeet-apty 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.