Skip to content

Commit

Permalink
Reuse ref parameter and remove repository from workflow (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
nanory authored Dec 12, 2023
1 parent ea90cdb commit 7f2ffda
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
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

0 comments on commit 7f2ffda

Please sign in to comment.