vocabulary-action

command module
v0.0.0-...-92a576a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2024 License: MIT Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

vocabulary action

A Github Action to create and update lists of vocabulary.

Usage

Note The Action has to be used in a Job that runs on a UNIX system (e.g. ubuntu-latest).

Example workflow:

name: Add Vocabulary

on:
  workflow_dispatch:
    inputs:
      language:
        description: Language of the vocabulary list
        required: true
        type: string
      vocabulary:
        description: Vocabulary list, one word per line
        required: true
        type: string

jobs:
  vocabulary:
    runs-on: ubuntu-latest

    # permission required for committing to the repository
    permissions:
      contents: write

    steps:
      - name: Checkout repository
        uses: actions/checkout@v3
        with:
          ref: ${{ github.head_ref }}

      - name: Add vocabulary
        id: vocabulary
        uses: leonhfr/vocabulary-action@release
        with:
          language: ${{ inputs.language }}
          vocabulary: ${{ inputs.vocabulary }}

      - name: Commit
        uses: stefanzweifel/git-auto-commit-action@v4
        with:
          file_pattern: ${{ steps.vocabulary.outputs.directory }}
          commit_message: "Add vocabulary: ${{ steps.vocabulary.outputs.summary }}"

Config

The action looks for a config file named vocabulary.yml in the root of the repository:

languages:
  ca: catalan/vocabulary
  de: german/vocabulary
  en: english/vocabulary
  es: spanish/vocabulary
  default: todo/vocabulary # not required

Inputs

The action requires two inputs:

  • language: The language of the vocabulary list. Will be used to lookup the target directory in the config file.
  • vocabulary: Vocabulary list, one word per file.

Outputs

You can use the outputs in other actions:

  • directory: The repository directory modified by the action.
  • summary: Summary of added vocabulary, intended to be used in a commit message.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址