Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
align-left

GitHub Action

csv-json-flag-keeper

0.2.0

csv-json-flag-keeper

align-left

csv-json-flag-keeper

Keep your summary sheet

Installation

Copy and paste the following snippet into your .yml file.

              

- name: csv-json-flag-keeper

uses: seed-of-apricot/[email protected]

Learn more about this action in seed-of-apricot/csv-json-flag-keeper

Choose a version

csv-flag-keeper

Keep flags on your records 📃.

Example

Suppose you have a summary sheet, where:

id flag1
100 1
101
102
103 1
104
105 1
...

several flags have been attached to the csv record.

Pushing csv like this:

id flag2
102 1
104 1
105 1

will annex the column to the csv record.

id flag1 flag2
100 1
101
102 1
103 1
104 1
105 1 1
...

Usage

This is an example used in this repository.

name: 'update-summary'
on:
  push:
    branches:
      - update-summary

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - name: checkout
        uses: actions/checkout@v2
        with:
          ref: update-summary
      - name: update-summary
        uses: seed-of-apricot/[email protected]
        with:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          summaryPath: example/example.csv
          flagPath: example/flags/*.csv
      - name: pull-request
        uses: peter-evans/create-pull-request@master
        with:
          commit-message: update summary
          title: Update Summary
          body: summary updated
          base: main
  1. Checkout
  2. Use this action
  3. Commit or make a pull request, depending on your needs

The parameters that this action refers to are:

parameter required default What is this
GITHUB_TOKEN Yes GitHub token
summaryPath Yes Path to the summary file
flagPath Yes Path to the flag files to be retrieved
id 'id' Column name of id

License

MIT License. This repository uses the typescript-action template so the original MIT license also applies.