mirror of
https://github.com/AnandChowdhary/package-version-action.git
synced 2025-12-06 15:58:26 +08:00
2.2 KiB
2.2 KiB
🔖 Package Version Action
GitHub Action to get the package.json version and a SHA suffix for unique versions.
⭐ Get started
This Action returns a recommend image name. For example, if you want to publish a new Docker image:
name: Docker CI
on:
workflow_dispatch:
jobs:
test:
name: Deploy to Docker
runs-on: ubuntu-latest
steps:
- name: Get package version
id: package-version
uses: actions/cache@v2
- name: Build and push to Docker
uses: docker/build-push-action@v2
with:
push: true
tags: username/anand:v${{ steps.package-version.outputs.package-version-short-hash }}
Outputs
| Output name | Example value |
|---|---|
package-version |
v2.23.1 |
package-version-timestamp |
v2.23.1-1609693587 |
short-hash |
1abc9c3 |
package-version-short-hash |
v2.23.1-1abc9c3 |
📄 License
An open source project by Koj.
Furnish your home in style, for as low as CHF175/month →