Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nelsondane/custom-github-actions
Reusable GitHub Workflows for automatic formatting/building/deploying and more!
https://github.com/nelsondane/custom-github-actions
action actions automation docker dockerhub dockerhub-description github-actions github-actions-docker reusable-workflows
Last synced: about 1 month ago
JSON representation
Reusable GitHub Workflows for automatic formatting/building/deploying and more!
- Host: GitHub
- URL: https://github.com/nelsondane/custom-github-actions
- Owner: NelsonDane
- Created: 2022-09-05T22:47:43.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-15T00:42:49.000Z (7 months ago)
- Last Synced: 2024-12-24T05:04:14.324Z (about 1 month ago)
- Topics: action, actions, automation, docker, dockerhub, dockerhub-description, github-actions, github-actions-docker, reusable-workflows
- Homepage:
- Size: 52.7 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Custom-GitHub-Actions
Personal GitHub Actions for Docker Containers and Code Formatting## How to use (for future self)
### Docker Registry Build and Push
Automatically builds and pushes images to Docker Hub.Required Inputs:
- `image_name`: (name of image)Optional Inputs:
- `registry`: (defaults to `docker.io`)
- `context`: (defaults to `.`)
- `dockerfile`: (defaults to `Dockerfile`)
- `platforms`: (defaults to `linux/amd64,linux/arm64,linux/arm/v7`)
- `image_tag`: (defaults to `latest`)
- `should_push`: (defaults to `false`)Optional Secrets:
- `DOCKER_REGISTRY_USERNAME`
- `DOCKER_REGISTRY_PASSWORD`Minimal Config (Only builds, does not push):
```yaml
jobs:
call-dockerhub-action:
uses: NelsonDane/Cusotm-GitHub-Actions/.github/workflows/docker-registry-build-push.yml@main
with:
image_name: name of image
```Example Config:
```yaml
jobs:
call-dockerhub-action:
uses: NelsonDane/Cusotm-GitHub-Actions/.github/workflows/docker-registry-build-push.yml@main
with:
image_name: name of image
platforms: (optional, comma-seperated with no spaces)
image_tag: (optional)
should_push: (optional)
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
```### Auto Update Docker Hub README/Description
Automatically updates the Docker Hub README/Description with the contents of the README.md file in the GitHub repo.Required Inputs:
- `image_name`Required Secrets:
- `DOCKERHUB_USERNAME`
- `DOCKERHUB_PASSWORD`Example Config:
```yaml
jobs:
call-dockerhub-action:
uses: NelsonDane/Cusotm-GitHub-Actions/.github/workflows/dockerhub-description.yml@main
with:
image_name: (name of image)
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
```### Format Python Code with Black
Automatically formats Python code with Black.Optional Inputs:
- `black_command`: (defaults to `black .`)Example Config:
```yaml
jobs:
call-dockerhub-action:
uses: NelsonDane/Cusotm-GitHub-Actions/.github/workflows/python-black-formatter.yml@main
with:
black_command: (optional)
```### Format Python Imports with isort
Automatically formats Python imports with isort and removes unused imports.Optional Inputs:
- `isort_command`: (defaults to `isort .`)Example Config:
```yaml
jobs:
call-dockerhub-action:
uses: NelsonDane/Cusotm-GitHub-Actions/.github/workflows/python-isort-formatter.yml@main
with:
isort_command: (optional)
```