Skip to content

Commit 7c59fd8

Browse files
authored
Merge pull request #2 from computology/ksh-add-example
Ksh add example
2 parents 9689d5a + bab873b commit 7c59fd8

2 files changed

Lines changed: 37 additions & 1 deletion

File tree

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,39 @@ inputs:
2222
description: The Token with push access. If logged in, you can get it [here](https://packagecloud.io/api_token)
2323
required: true
2424
```
25+
26+
## Usage
27+
```yaml
28+
name: dev-ci
29+
on: [push]
30+
jobs:
31+
upload:
32+
runs-on: ubuntu-latest
33+
steps:
34+
##### MODIFY: Add steps to build package or copy package to github action container
35+
##### so it is available to github action to upload to packagecloud
36+
- name: push package to packagecloud.io
37+
uses: computology/packagecloud-github-action@v0.6
38+
with:
39+
##### MODIFY: Change to packagecloud username, reponame, distro type
40+
##### To understand the available distro type, see <https://www.rubydoc.info/gems/package_cloud/#pushing-a-package>
41+
PACKAGE-NAME: dist/*.tar.gz
42+
PACKAGECLOUD-USERNAME: test_user
43+
PACKAGECLOUD-REPONAME: test_repo
44+
PACKAGECLOUD-DISTRO: python
45+
PACKAGECLOUD-TOKEN: ${{ secrets.packagecloud_token }}
46+
```
47+
48+
## Example
49+
50+
* https://github.com/computology/python-github-action-example
51+
52+
## Additional Steps
53+
54+
* Add to your github repository settings, a secret called `packagecloud_token`, which is
55+
the API token you get from <https://packagecloud.io/api_token>
56+
* On your github repo, click 'Settings'
57+
* On the left nav bar, under 'Security', click 'Secrets and variables'
58+
* Add a secret with name 'packagecloud_token' and value of API token from <https://packagecloud.io/api_token>
59+
60+

entrypoint-bullseye.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ UPLOAD_PATH="${PACKAGECLOUD_USERNAME}/${PACKAGECLOUD_REPONAME}/${PACKAGECLOUD_DI
1010
echo "Pushing package: ${PACKAGE_NAME}"
1111
echo "To repository: ${UPLOAD_PATH}"
1212

13-
package_cloud push ${UPLOAD_PATH} ${PACKAGE_NAME}
13+
/usr/local/bundle/bin/package_cloud push ${UPLOAD_PATH} ${PACKAGE_NAME}

0 commit comments

Comments
 (0)