/github-actions

Collection of Digdir GitHub actions

Primary LanguageTypeScriptMIT LicenseMIT

Digdir GitHub Actions Repository

Bats Tests Run Jest Tests Lint Codebase

Welcome to the GitHub Actions Repository for Digdir! This repository contains a collection of custom GitHub Actions developed by the Digdir Platform Team to automate various tasks in our workflows.

Actions

This GitHub Action is designed to add deployment text annotations to Grafana dashboards, enhancing observability and tracking changes effectively.

This GitHub Action checks if a specified file exists within the repository. It provides an output indicating whether the file exists or not.

This GitHub Action retrieves release notes based on the comparison between two commit SHAs in a GitHub repository. It provides an array of release notes as output.

This GitHub Action authenticates with GitHub using an App ID, Private Key, Installation ID, and generates a token.

This GitHub Action enables you to write JSON content to the workflow summary, presenting structured data in a clear and readable format in the GitHub Actions UI.

This GitHub Action automates the process of publishing release notes to a repository based on specified inputs. It extracts release notes from the provided input and, if conditions are met, dispatches an event for updating the releas notes.

ActionLint is a tool for linting GitHub Actions workflow files to ensure they adhere to best practices and standards. This GitHub Action integrates ActionLint into your workflows, helping maintain code quality.

This GitHub Action notifies designated Slack channels about workflow events, enabling teams to stay informed and facilitate rapid response and resolution.

The Validate Pull Request Title GitHub Action checks if the title of a pull request meets specified criteria, including length constraints and required prefixes. It helps maintain consistency and clarity in pull request titles within your repository.

This GitHub Action allows you to write data to InfluxDB, a time-series database. It's useful for storing and analyzing time-stamped data, such as metrics and events.

Publishing a New Release

To publish a new release, follow these steps:

  1. Create a new signed tag:

    git tag -s -a v0.7.4 -m "v0.7.4"
  2. Push the tag to the origin repository:

    git push origin v0.7.4
  3. This will trigger the internal-publish-release.yml workflow.

Important

Make sure to replace v0.7.4 with your actual version number.

Linting

Linting is done using super-linter/super-linter/slim and new Actions should be added to the internal-linter.yml to be linted automatically.

Creating a new Github Action

New actions should be generated using typescript-action template.

License

These GitHub Actions are open-source and distributed under the MIT License. Feel free to use, modify, and distribute them according to your needs.