Skip to content

Commit

Permalink
cleaner docs
Browse files Browse the repository at this point in the history
  • Loading branch information
iloveitaly committed Jun 24, 2024
1 parent 85d34e5 commit a51e93e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 18 deletions.
26 changes: 9 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,18 @@ It's very opinionated out the box (as software should be!) but allows you to cus
push: true
```
To use this action in your workflow, add the following step:
Multi-architecture builds are easy:
```yaml
- uses: iloveitaly/github-action-nixpacks@main
- name: Build and push Docker images
uses: iloveitaly/github-action-nixpacks@main
with:
context: './path-to-app'
tags: 'latest,stable'
labels: 'version=1.0,framework=express'
platforms: 'linux/amd64,linux/arm64'
pkgs: 'nodejs,npm'
apt: 'curl,git'
platforms: "linux/amd64,linux/arm64"
push: true
```
Ensure that your GitHub Actions runner has Docker installed and configured correctly, especially if you're pushing to a private registry.
Here's a complete example of a workflow that uses this action:
Ensure that your GitHub Actions runner has Docker installed and configured correctly, especially if you're pushing to a private registry. Here's a full example which also
shows how to override the default tags:
```yaml
name: Build & Publish
Expand All @@ -66,10 +62,6 @@ jobs:
build:
runs-on: ubuntu-latest

# really important for ensuring that the package inherits the permissions of the repo
# https://stackoverflow.com/questions/77092191/use-github-to-change-visibility-of-ghcr-io-package
permissions: write-all

steps:
- uses: actions/checkout@v4

Expand All @@ -90,8 +82,8 @@ jobs:
with:
push: true
tags: |
${{ env.IMAGE_NAME }}:${{ env.DATE_STAMP }}
${{ env.IMAGE_NAME }}:latest
${{ env.IMAGE_NAME }}:custom-${{ env.DATE_STAMP }}
${{ env.IMAGE_NAME }}:awesome-latest
```
### Multi-architecture builds
Expand Down
3 changes: 2 additions & 1 deletion TODO
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
- [ ] docker image for execution so we don't need mapping and installing nixpacks each time?
- [ ] cron to automatically rebuild container each month for nixpacks upgrades?
- [ ] only add labels if not already defined
- [ ] support non-ghcr for multi arch builds
- [ ] support non-ghcr for multi arch builds
- [ ] can we push and build in parallel to optimize gh actions billing time?

0 comments on commit a51e93e

Please sign in to comment.