1 min to read
Creating and Publishing GitHub Actions
A guide to creating custom GitHub Actions and publishing them to the Marketplace

Overview
Learn how to create custom GitHub Actions and publish them to the GitHub Marketplace. We’ll walk through creating a container-based action and the process of publishing it.
My Published Actions
- Extract Commit Action
- Compress Decompress
- Ternary Operator Action
- Image Tag Updater
- Environment Output Setter
Creating GitHub Action Template
1. Create Action Repository
Use the container-action template provided by GitHub as a starting point.
2. Configure Docker Components
Dockerfile
entrypoint.sh
3. Define Action Metadata
action.yml
4. Local Testing
Create a test environment file
# Build Docker image
docker build -f Dockerfile -t extract-commit-action .
# Run test
<script src="https://gist.github.com/somaz94/82f0c273847b6768718acee90fb65f55.js"></script>
<br/>
----------------------------------------------
### Publishing to GitHub Marketplace
- [Github Marketplace Docs](https://docs.github.com/en/actions/creating-actions/publishing-actions-in-github-marketplace#publishing-an-action)
#### 1. Version Management
```bash
# Create new version
git tag v1.0.1
git push origin v1.0.1
# Update major version tag
git tag -f v1 v1.0.1
git push -f origin v1
Comments