File tree 4 files changed +81
-2
lines changed
4 files changed +81
-2
lines changed Original file line number Diff line number Diff line change
1
+ FROM ruby:2
2
+
3
+ RUN gem install package_cloud
4
+ COPY pc-wrapper.sh /pc-wrapper.sh
5
+
6
+ ENTRYPOINT [ "/pc-wrapper.sh" ]
7
+ CMD []
Original file line number Diff line number Diff line change 1
- # packagecloud-action
2
- GIthub Action to upload packages to packagecloud.io
1
+ # PackageCloud docker action
2
+
3
+ This action will push packages to PackageCloud using the package_cloud gem.
4
+
5
+ ## Inputs
6
+
7
+ ### ` repo `
8
+
9
+ ** Required** The repo to push to.
10
+
11
+ ### ` dir `
12
+
13
+ ** Required** Directory where the packages are. All rpms and debs found here will be pushed.
14
+
15
+ ## Outputs
16
+
17
+ ### ` rpmout `
18
+ Stdout from the command execution for rpm packages
19
+
20
+ ### ` debout `
21
+ Stdout from the command execution for deb packages
22
+
23
+ ## Example usage
24
+
25
+ ``` yaml
26
+ uses : TykTechnologies/packagecloud-action
27
+ env :
28
+ PACKAGECLOUD_TOKEN : ${{ secrets.PACKAGECLOUD_TOKEN }}
29
+ with :
30
+ repo : ' tyk/tyk-sync-unstable'
31
+ dir : ' dist'
32
+ ` ` `
Original file line number Diff line number Diff line change
1
+ # action.yml
2
+ name : ' PackageCloud'
3
+ description : ' Interact with PackageCloud via the package_cloud gem.'
4
+ inputs :
5
+ repo :
6
+ description : ' PackageCloud repo name to use'
7
+ required : true
8
+ dir :
9
+ description : ' base directory where packages are'
10
+ required : true
11
+ outputs :
12
+ rpmout :
13
+ description : ' Output from rpm uploads'
14
+ debout :
15
+ description : ' Output from deb uploads'
16
+ runs :
17
+ using : ' docker'
18
+ image : ' Dockerfile'
19
+ args :
20
+ - ${{ inputs.repo }}
21
+ - ${{ inputs.dir }}
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -eo pipefail
4
+
5
+ for v in el/6 el/7 ol/6 ol/7
6
+ do
7
+ echo Pushing to $1 /$v
8
+ package_cloud push --verbose --yes ${1} /${v} ${2} /* .rpm
9
+ done | tee rpmout
10
+
11
+ for v in ubuntu/xenial ubuntu/bionic debian/jessie debian/stretch debian/buster
12
+ do
13
+ echo Pushing to $1 /$v
14
+ package_cloud push --yes ${1} /${v} ${2} /* .deb
15
+ done | tee debout
16
+
17
+ rpmout=$( < rpmout)
18
+ debout=$( < debout)
19
+
20
+ echo " ::set-output name=rpmout::$rpmout "
21
+ echo " ::set-output name=debout::$debout "
You can’t perform that action at this time.
0 commit comments