Code Monkey home page Code Monkey logo

action-setup-lokalise's Introduction

๐Ÿš€ Frenck's Github Action: Lokalise CLI

GitHub Release Project Stage Project Maintenance License

Sponsor Frenck via GitHub Sponsors

๐Ÿš€ Frenck's GitHub Action for setting up the Lokalise2 CLI.

About

A very simple and easy to use GitHub Action for setting up the Lokalise2 CLI for use in your GitHub Actions.

All it does is installing it, after that you can just use the CLI in your GitHub actions.

Usage

name: Example
on: [push, pull_request]
jobs:
  example:
    name: Example
    runs-on: ubuntu-latest
    steps:
      - name: ๐Ÿ— Set up the Lokalise CLI
        uses: frenck/action-setup-lokalise@v1
      - name: ๐Ÿš€ Use Lokalise
        run: lokalise2 --version

Arguments

Input Description Usage
version The CLI version to install. The latest if omitted. Optional

Outputs

Output Description Usage
version The version of the CLI that was installed. Optional

Real-world examples

The following repositories are using this GitHub Action, and thus provide you with some real-world uses of this GitHub Action.

Are you using this GitHub Action? Feel free to open up a PR to add your configuration to this list ๐Ÿ˜

Versions & Updating

You can specify which version of this GitHub Action your workflow should use. And even allowing for using the latest major or minor version.

For example; this will use release v1.1.1 of a GitHub Action:

- name: ๐Ÿ— Set up the Lokalise CLI
  uses: frenck/[email protected]

While the following example, will use the v1.1.x minor release, for example if v1.1.2 is the latest releases (starting with v1.1), this will run v1.1.2:

- name: ๐Ÿ— Set up the Lokalise CLI
  uses: frenck/[email protected]

As in the examples throughout the documentation, the following example is locked on major version, meaning any v1.x.x latest version will be used, as long as it is version 1.

- name: ๐Ÿ— Set up the Lokalise CLI
  uses: frenck/action-setup-lokalise@v1

Automatically update using Dependabot

The advantage of locking against a more specific version, is that it prevents surprises if an issue or breaking changes were introduced in a newer release.

The disadvantage of being more specific, is that it requires you to keep things up to date. Fortunately, GitHub has a tool for that, called: Dependabot.

Dependabot can automatically open a pull request on your repository to update this Action for you. You can instantly see if the new version works (as the pull request shows the success or failure status) and you can decide to merge it in by hitting the merge button. Quick, easy and always up2date.

To enable Dependabot, create a file called .github/dependabot.yaml:

version: 2
updates:
  - package-ecosystem: "github-actions"
    directory: "/"
    schedule:
      interval: daily

Your all set! Dependabot will now check (and update) your GitHub actions every day. ๐Ÿคฉ

Changelog & Releases

This repository keeps a change log using GitHub's releases functionality.

Releases are based on Semantic Versioning, and use the format of MAJOR.MINOR.PATCH. In a nutshell, the version will be incremented based on the following:

  • MAJOR: Incompatible or major changes.
  • MINOR: Backwards-compatible new features and enhancements.
  • PATCH: Backwards-compatible bugfixes and package updates.

Contributing

This is an active open-source project. We are always open to people who want to use the code or contribute to it.

We've set up a separate document for our contribution guidelines.

Thank you for being involved! ๐Ÿ˜

Authors & contributors

The original setup of this repository is by Franck Nijhof.

For a full list of all authors and contributors, check the contributor's page.

License

MIT License

Copyright (c) 2021-2022 Franck Nijhof

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

action-setup-lokalise's People

Contributors

dependabot[bot] avatar frenck avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

d-a-n42

action-setup-lokalise's Issues

GH Rate limiting

First, thanks for providing this action to the community ๐Ÿ‘

The request in https://github.com/frenck/action-setup-lokalise/blob/main/action.yaml#L28 quickly runs into GHs API rate limiting. To avoid this, we should add a token input that allows users to provide their own access token to prevent rate-limiting issues:

curl -s --header 'Authorization: Bearer ${{ inputs.token }}' https://api.github.com/repos/lokalise/lokalise-cli-2-go/releases/latest | jq -r '.tag_name'

Another idea would be to not fetch it for each usage - as the versions don't change that often - but hard code it and update the version regularly via an action in this repo. E.g. once a day:

name: Update Lokalise Version
on:
  workflow_dispatch:
  schedule:
    - cron: '0 0 * * *' # Runs every day at midnight

jobs:
  update-lokalise-cli-version:
    runs-on: self-hosted
    steps:
      - name: Checkout code
        uses: actions/checkout@v2

      - name: Fetch latest Lokalise version
        id: fetch-version
        run: |
          version=$(curl --silent "https://api.github.com/repos/lokalise/lokalise-cli-2-go/releases/latest" | jq -r .tag_name)
          echo "::set-output name=version::$version"

      - name: Setting Lokalise CLI version default to current version
        uses: mikefarah/yq@master
        with:
          cmd: yq eval '.inputs.version.default = "${{ steps.fetch-version.outputs.version }}"' -i action.yml

      - name: Commit and push if changes
        run: |
          git add -A
          git diff --quiet && git diff --staged --quiet || (git commit -m 'Update Lokalise version'; git push)

@frenck What do you think?

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

github-actions
.github/workflows/additional-tags.yaml
  • actions/checkout v4.1.5
  • vweevers/additional-tags-action v2.0.0
.github/workflows/labels.yaml
  • actions/checkout v4.1.5
  • micnncim/action-label-syncer v1.3.0
.github/workflows/lint.yaml
  • actions/checkout v4.1.5
  • actionshub/markdownlint v3.1.4
  • actions/checkout v4.1.5
  • creyD/prettier_action v4.3
  • actions/checkout v4.1.5
  • frenck/action-yamllint v1.5
.github/workflows/lock.yaml
  • dessant/lock-threads v5.0.1
.github/workflows/pr-labels.yaml
  • jesusvasquez333/verify-pr-label-action v1.4.0
.github/workflows/release-drafter.yaml
  • release-drafter/release-drafter v6.0.0
.github/workflows/stale.yaml
  • actions/stale v9.0.0
.github/workflows/test.yaml
  • actions/checkout v4.1.5

  • Check this box to trigger a request for Renovate to run again on this repository

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.