Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

smashedr/javascript-action

Open more actions menu

Repository files navigation

GitHub Tag Major GitHub Tag Minor GitHub Release Version GitHub Dist Size Workflow Release Workflow Test Workflow Lint Quality Gate Status GitHub Last Commit Codeberg Last Commit GitHub Repo Size GitHub Top Language GitHub Contributors GitHub Issues GitHub Discussions GitHub Forks GitHub Repo Stars GitHub Org Stars Discord Ko-fi

JavaScript Action Template

JavaScript Action Template

JavaScript Action Template using Rollup.

Features

This action creates or updates the provided tag to the sha has that triggered the workflow.

This includes inputs, outputs, job summary, and automatic token authentication.

Inputs

Input Req. Default Input Description
tag - test Tag to Create or Update
summary - true Add Summary to Job
token - github.token Only for PAT
👀 View Example Job Summary

Updated: test ➡️ 6470ef53102d5229672433f1adb6afa42e7b64d9

Inputs
InputValue
tagtest
summarytrue

With no inputs this will create/update the tag test.

- name: 'JavaScript Action'
  uses: smashedr/javascript-action@master

With all inputs.

- name: 'JavaScript Action'
  uses: smashedr/javascript-action@master
  with:
    tag: test
    summary: true
    token: ${{ secrets.PAT }} # only include this if you need to use a PAT

Permissions

This action requires the following permissions:

permissions:
  contents: write

Permissions documentation for Workflows and Actions.

Outputs

Output Description
sha Tag Hash
- name: 'JavaScript Action Template'
  id: test
  uses: smashedr/javascript-action@master
  with:
    tag: test

- name: 'Echo Output'
  run: |
    echo "sha: '${{ steps.test.outputs.sha }}'"

Examples

💡 Click on an example heading to expand or collapse the example.

name: 'Test'

on:
  workflow_dispatch:
  push:

jobs:
  test:
    name: 'Test'
    runs-on: ubuntu-latest
    timeout-minutes: 5
    permissions:
      contents: write

    steps:
      - name: 'Checkout'
        uses: actions/checkout@v6

      - name: 'JavaScript Action'
        id: test
        uses: smashedr/javascript-action@master

      - name: 'Echo Outputs'
        run: |
          echo "sha: '${{ steps.test.outputs.sha }}'"

For more examples, you can check out other projects using this action:
https://github.com/smashedr/javascript-action/network/dependents

Tags

The following rolling tags are maintained.

Version Tag Rolling Bugs Feat. Name Target Example
GitHub Tag Major Major vN.x.x vN
GitHub Tag Minor Minor vN.N.x vN.N
GitHub Release Micro vN.N.N vN.N.N

You can view the release notes for each version on the releases page.

The Major tag is recommended. It is the most up-to-date and always backwards compatible. Breaking changes would result in a Major version bump. At a minimum you should use a Minor tag.

Support

If you run into any issues or need help getting started, please do one of the following:

Features Issues Discussions Discord

Contributing

If you would like to submit a PR, please review the CONTRIBUTING.md.

Please consider making a donation to support the development of this project and additional open source projects.

Ko-fi

Actions Tools

Additionally, you can support other GitHub Actions I have published:

❔ Unpublished Actions

These actions are not published on the Marketplace, but may be useful.


📝 Template Actions

These are basic action templates that I use for creating new actions.

Note: The docker-test-action builds, runs and pushes images to GitHub Container Registry.


For a full list of current projects visit: https://cssnr.github.io/

About

JavaScript Action Template using Rollup

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Contributors

Morty Proxy This is a proxified and sanitized view of the page, visit original site.