Git Product home page Git Product logo

sver-action's Introduction

sver-action

Semantic versioning action.

Can output:

  • The current version of your repo, as calculated by sver.
  • The next patch/minor/major version
  • The tags you should apply to your docker container image

Example

jobs:
  build:
    steps:
      - uses: actions/checkout@v3
      - name: Login to GitHub Packages Docker Registry
        uses: docker/login-action@v1
        with:
          registry: https://ghcr.io
          username: ${{ env.DOCKER_USERNAME }}
          password: ${{ env.DOCKER_PASSWORD }}
      - uses: aserto-dev/sver@v0
        name: Calculate Tags
        id: "sver"
        with:
          docker_image: ${{ env.DOCKER_IMAGE }}
          docker_registry: "https://ghcr.io"
          docker_registry_username: ${{ env.DOCKER_USERNAME }}
          docker_registry_password: ${{ env.DOCKER_PASSWORD }}
      - name: Push image to GitHub Container Registry
        run: |
          echo "${{ steps.sver.outputs.version }}" | \
            xargs -I{} bash -c "docker tag my-image ghcr.io:{}' \
            && docker push '${{ env.DOCKER_IMAGE }}:{}'

Inputs

pre_release

Optional If specified, this pre release reference will be added to the calculated semantic version.

docker_image

Optional If specified, sver will calculate the tags for your docker image.

docker_registry

Optional Registry for the docker image.

docker_username

Optional Credentials for connecting to the docker registry.

docker_password

Optional Credentials for connecting to the docker registry.

next

Optional Tells sver to print the next version, not the current one. Can be one of patch, minor or major.

Outputs

version

The calculated version. When using this to calculate tags, the output is a multiline string, with each tag on a separate line.

sver-action's People

Contributors

viovanov avatar gertd avatar

Stargazers

Acumenix avatar Omri Gazitt avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

syllogy topaz-sh

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.