Skip to content

My balasting field for Github Actions. The place to test workflows, actions their result.

Notifications You must be signed in to change notification settings

dplocki/special-octo-potato

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🥔 Special Octo Potato

This is my blasting field for Github Actions. The place to test workflows, actions their result.

Notes

  • Official help for GitHub Actions
  • You cannot use the alpine image as runs-on
  • Job names must start with a letter or _ and contain only alphanumeric characters, -, or _
  • You can react to tags without declaring the branch
  • If you have a syntax error in your workflow file, you lose access to the history of previous builds for that workflow
  • The workflow must contain at least one job with no dependencies
  • If the cron schedule contains a slash / character, it needs to be in quotes
  • Scheduled tasks seem to have some delay in starting
  • The difference between github.ref_name and GITHUB_REF while dealing with tag: one return only the tag name, the other the full tag name (with prefix)

Github NPM Packages

There is possibility for publish npm packages directly on Github (as not scoped repository). See GitHub Packages: Your packages, at home with their code.

The usage in workflow is described here: Publishing Node.js packages.

Example set-up code:

      - name: "Set up the NPM"
        uses: actions/setup-node@v2
        with:
          node-version: '16'
          registry-url: 'https://npm.pkg.github.com'
          scope: '@dplocki'

Later usage:

      - name: "Compering version"
        run: |
          echo `npm info @dplocki/generic-conversation-bot version`
        env:
          NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

Create tag

      - name: Create Tag
        uses: negz/create-tag@v1
        with:
          version: v0.1.1
          message: Release for version v0.1.1
          token: ${{ secrets.GITHUB_TOKEN }}

Multiline scripts in YML

  run: |
    cat << EOF > run.py
    echo line 1
    echo line 2
    ; no indents on each of this lines
    EOF

Links