Skip to content

Commit

Permalink
Add publish action (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
crohr authored May 31, 2024
1 parent c2518b9 commit 521a2ca
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
name: blank-sinatra-app
version: '1.0.0'
path: app
debug: true
- name: Upload
uses: actions/upload-artifact@v4
with:
Expand Down
12 changes: 11 additions & 1 deletion package/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ inputs:
description: 'Prefix for the cache'
required: true
default: 'v1'
env:
description: 'Environment variables to pass to pkgr'
required: false
default: ''
debug:
description: 'Debug mode'
required: false
default: 'false'

outputs:
workspace:
Expand Down Expand Up @@ -68,6 +76,7 @@ runs:
with:
path: ${{ steps.setup.outputs.workspace }}/cache
key: pkgr-${{ inputs.cache_prefix }}-${{ inputs.target }}-${{ inputs.pkgr_version }}
save-always: true

- name: Package
shell: bash
Expand All @@ -80,8 +89,9 @@ runs:
-v .:/pkgr/app \
-v $workspace/cache:/pkgr/cache \
-v $workspace/output:/pkgr/output \
--net=host \
ghcr.io/crohr/pkgr/${{ inputs.target }}-${{ inputs.pkgr_version }} \
--name "${{ inputs.name }}" --version "${{ inputs.version }}" --iteration "${{ steps.setup.outputs.iteration }}"
--name "${{ inputs.name }}" --version "${{ inputs.version }}" --iteration "${{ steps.setup.outputs.iteration }}" --env "${{ inputs.env }}" --debug=${{ inputs.debug }}
package_path=""
if [ -f $workspace/output/*.deb ]; then
Expand Down

0 comments on commit 521a2ca

Please sign in to comment.