Code Monkey home page Code Monkey logo

snapshotter's Introduction

snapshotter

A GitHub Action which creates a string using the commit SHA and the current timestamp which can be used to name a tag and then publish it to GitHub.

Usage

name: snapshot workflow
on:
  push:
    branches:
      - master
jobs:
  Generate Tag:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Create tag with Github SHA and timestamp
      uses: DevourTech/[email protected]
      with:
        BASE_VERSION: v0.0.0
        GITHUB_TOKEN: ${{ github.token }}
        GITHUB_USERNAME: <Your GitHub username>
        GITHUB_REPOSITORY: <Repository for which you want the tag to be released>

Options

Inputs

  • BASE_VERSION (Required)

Base semantic version used to create snapshot.
Eg. v3.4.3

  • GITHUB_TOKEN (Required)

Github Token used to authenticate to GitHub.

  • GITHUB_USERNAME (Required)

Username used to login to GitHub
Eg. DevourTech

  • GITHUB_REPOSITORY (Required)

Repository for which the tag is supposed to be generated on the latest commit.
Eg. snapshotter

Outputs

  • SNAPSHOT_VERSION

Version generated by the action.

Eg.v3.4.3-20200712152333-a007e621125e

Workflow

  • Add this action to your repo
  • Commit some changes
  • push either to master or any other branch specified in the workflow
  • On push (or merge), the action will:
    • Get the latest commit hash and timestamp
    • Generate a custom string using the above two arguments

NOTE

This action just generates a custom string which can be used as an output to release a tag with custom name. If you also want to release this tag to GitHub, add this action GitHub Script to your workflow file .

snapshotter's People

Contributors

archit-1997 avatar rohan23chhabra avatar

Stargazers

 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.