Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/61 re use repository and ref parameter #62

Merged
merged 2 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/build_pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@ name: build
on:
workflow_call:
inputs:
repository:
type: string
default: ${{ github.repository }}
ref:
type: string
default: ${{ github.sha }}
default: main
build_container:
type: string
default: ghcr.io/gardenlinux/package-build
Expand Down Expand Up @@ -59,11 +56,12 @@ jobs:
- uses: actions/checkout@v4
with:
repository: gardenlinux/package-build
ref: ${{ inputs.ref }}
- run: mkdir input output
- uses: actions/checkout@v4
with:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
repository: ${{ github.repository }}
ref: ${{ github.sha }}
path: input
fetch-tags: true
fetch-depth: 0
Expand Down Expand Up @@ -125,6 +123,7 @@ jobs:
- uses: actions/checkout@v4
with:
repository: gardenlinux/package-build
ref: ${{ inputs.ref }}
- name: setup binfmt
if: ${{ matrix.arch == 'arm64v8' }}
run: sudo podman run --privileged ghcr.io/gardenlinux/binfmt_container
Expand Down Expand Up @@ -190,6 +189,7 @@ jobs:
- uses: actions/checkout@v4
with:
repository: gardenlinux/package-build
ref: ${{ inputs.ref }}
- name: check if ${{ env.pkg }} already released
id: check
run: |
Expand Down
3 changes: 1 addition & 2 deletions docs/workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ The `build_pkg.yml` workflow can be triggered by calling it with specific input
Input Parameters available in `build_pkg.yml`:
| Parameter | Type | Description |
| --------- | ---- | ------------|
|`repository`|**Type:** string<br>**Default:** `${{ github.repository }}`| The repository to build the package from.|
|`ref`|**Type:** string<br>**Default:** `${{ github.sha }}`| The ref (commit or branch) to build the package from.|
|`ref`|**Type:** string<br>**Default:** `${{ github.sha }}`| The ref (commit or branch) that should be checked out from the `package-build` repo while processing the package build.|
|`build_container`|**Type:** string<br>**Default:** `ghcr.io/gardenlinux/package-build`| The container image used for building the package.|
|`dependencies`|**Type:** string| Comma-separated list of repositories and tags to fetch dependencies from.|
|`source`|**Type:** string| The source name of the package. There are three values that one can choose from:<br>- Debian Source Package: `{SOURCE PACKAGE NAME}`<br>- Git Source: `git+{GIT URL}`<br>- Native Build: `native`|
Expand Down