Skip to content

Commit

Permalink
Merge branch 'main' into maximize-build-space-input
Browse files Browse the repository at this point in the history
  • Loading branch information
xynydev authored Feb 23, 2024
2 parents 0417676 + 5d69b36 commit 1166452
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 13 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
on:
push:
branches:
- main

permissions:
contents: write
pull-requests: write

name: release-please

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v4
with:
release-type: simple

# tag major and minor versions
- uses: actions/checkout@v4
- name: tag major and minor versions
if: ${{ steps.release.outputs.release_created }}
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git remote add gh-token "https://${{ secrets.GITHUB_TOKEN }}@github.com/google-github-actions/release-please-action.git"
git tag -d v${{ steps.release.outputs.major }} || true
git tag -d v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
git push origin :v${{ steps.release.outputs.major }} || true
git push origin :v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
git tag -a v${{ steps.release.outputs.major }} -m "Release v${{ steps.release.outputs.major }}"
git tag -a v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} -m "Release v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}"
git push origin v${{ steps.release.outputs.major }}
git push origin v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}
# upload action.yml to release
# this is used to generate versioned documentation
- name: upload action.yml to release
if: ${{ steps.release.outputs.release_created }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ steps.release.outputs.tag_name }} ./action.yml


2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# BlueBuild GitHub Action

This reusable Action can be used to build custom operating system images using BlueBuild tools. Check out the [template](https://github.com/blue-build/template) for an example of this Action in use.
This reusable Action can be used to build custom operating system images using BlueBuild tools. Check out the [template](https://github.com/blue-build/template) for an example of this Action in use. Check out the [reference page](https://blue-build.org/reference/github-action/) on the website for the list of inputs with documentation.
39 changes: 27 additions & 12 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,47 @@ name: 'BlueBuild'
description: 'Build a custom OS image'
inputs:
recipe:
description: 'recipe.yml file to build'
description: |
The [recipe](https://blue-build.org/reference/recipe/) file to build the image from, relative to the `config/` directory.
required: true
default: 'recipe.yml'
registry:
description: 'container registry to push image to (default: ghcr.io)'
required: false
default: 'ghcr.io'
registry_namespace:
description: 'namespace on registry to push to (example: ublue-os)'
required: false
default: ${{github.repository_owner}}
cosign_private_key:
description: 'secret used to sign final image'
description: |
The Sigstore/cosign secret used to sign the image.
Example: `${{ secrets.SIGNING_SECRET }}`
required: true
registry_token:
description: 'token used to sign into registry'
description: |
The token used to sign into the container registry.
Example: `${{ github.token }}`
required: true
pr_event_number:
description: 'event number'
description: |
The event number used to tag images pushed from pull requests.
Example: `${{ github.event.number }}`
required: true
maximize_build_space:
description: |
Whether to run the unwanted software remover to maximize build space in the GitHub builder.
Use this if your builds are taking too much space.
Input must match the string 'true' for the step to be enabled.
required: false
default: 'false'
registry:
description: |
The container registry to push the built image to.
required: false
default: 'ghcr.io'
registry_namespace:
description: |
The namespace on the registry to push to.
Example: `ublue-os`
required: false
default: ${{ github.repository_owner }}
runs:
using: "composite"
steps:
Expand Down

0 comments on commit 1166452

Please sign in to comment.