diff --git a/docs/label.json b/.github/workflows/labels.json similarity index 100% rename from docs/label.json rename to .github/workflows/labels.json diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml index 85a668090c..d927d89193 100644 --- a/.github/workflows/manual.yml +++ b/.github/workflows/manual.yml @@ -14,16 +14,22 @@ jobs: with: node-version: '14' + - name: Install dependency + run: npm install github-label-template + shell: bash + - name: Delete existing labels run: | - echo "GitHub Token: ${{ secrets.github-token }}" - if [ "${{ inputs.force }}" = true ]; then - npx ghlbl -o ${{ inputs.owner-name }} -r ${{ inputs.repository-name }} -t ${{ secrets.github-token }} -d + echo "GitHub Token: ${{ secrets.GITHUB_TOKEN }}" + force=${{ inputs.force || 'false' }} + if [ "$force" = true ]; then + npx ghlbl -o ${{ secrets.OWNER_NAME }} -r ${{ secrets.REPO_NAME }} -t ${{ secrets.GITHUB_TOKEN }} -d else echo -e "Existing labels not removed" fi shell: bash - name: Import labels from json file - run: npx ghlbl -o ${{ inputs.owner-name }} -r ${{ inputs.repository-name }} -t ${{ secrets.github-token }} -i ${{ github.action_path }}/labels.json + run: npx ghlbl -o ${{ secrets.OWNER_NAME }} -r ${{ secrets.REPO_NAME }} -t ${{ secrets.GITHUB_TOKEN }} -i .github/workflows/labels.json shell: bash +