-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #121 from StackStorm-Exchange/gha
Add Github Actions workflows and composite actions for packs to use
- Loading branch information
Showing
21 changed files
with
1,052 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
--- | ||
name: Install APT Dependencies | ||
description: | | ||
Install debian dependencies required for StackStorm-Exchange pack tests. | ||
Before using this, make sure to run | ||
StackStorm-Exchange/ci/.github/actions/checkout. | ||
author: StackStorm | ||
|
||
inputs: | ||
cache-version: | ||
required: false | ||
default: "v0" | ||
extra-apt-packages-file: | ||
required: false | ||
default: pack/.github/apt-packages.txt | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
|
||
# TODO: not working on GHA. Need to revisit caching. | ||
#- name: Create a directory for debian packages so we can cache it | ||
# # this is what we did on CircleCI. Not sure if it'll work on GHA | ||
# shell: bash | ||
# run: > | ||
# sudo rm -rf /var/cache/apt/archives /var/lib/apt/lists | ||
# && sudo ln -s ~/apt_cache/archives /var/cache/apt/archives | ||
# && sudo ln -s ~/apt_cache/lists /var/lib/apt/lists | ||
# && mkdir -p ~/apt_cache/archives/partial ~/apt_cache/lists | ||
|
||
# hashFiles only reads files relative to GITHUB_WORKSPACE | ||
- name: Construct apt-packages.txt | ||
shell: bash | ||
run: | | ||
cp ${{ github.action_path }}/apt-packages.txt ${GITHUB_WORKSPACE}/ | ||
if [[ -f ${{ inputs.extra-apt-packages-file }} ]]; then | ||
cat ${{ inputs.extra-apt-packages-file }} >> ${GITHUB_WORKSPACE}/apt-packages.txt | ||
fi | ||
#- name: Cache APT Dependencies | ||
# id: cache-apt-deps | ||
# uses: actions/cache@v2 | ||
# with: | ||
# path: | | ||
# ~/apt_cache/*.deb | ||
# key: ${{ inputs.cache-version }}-apt-archives-and-lists-${{ hashFiles('apt-packages.txt') }} | ||
# restore-keys: | | ||
# ${{ inputs.cache-version }}-apt-archives-and-lists- | ||
|
||
- name: Install APT Dependencies | ||
shell: bash | ||
env: | ||
# CACHE_HIT: ${{steps.cache-apt-deps.outputs.cache-hit}} | ||
CACHE_HIT: "false" | ||
APT_PACKAGES_FILE_PATH: apt-packages.txt | ||
DEBIAN_FRONTEND: noninteractive | ||
run: | | ||
echo "::group::Install APT Dependencies" | ||
if [[ "${CACHE_HIT}" != 'true' ]]; then | ||
sudo apt-get -o=Dpkg::Use-Pty=0 -yq update | ||
fi | ||
APT_PACKAGES=$(grep -v '^#' "${APT_PACKAGES_FILE_PATH}" | xargs echo -n) | ||
sudo apt-get -o=Dpkg::Use-Pty=0 -yq install ${APT_PACKAGES} | ||
echo "::endgroup::" | ||
- name: Print versions | ||
shell: bash | ||
run: | | ||
echo "::group::Print Versions" | ||
jq --version | ||
gh --version | ||
echo "::endgroup::" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# pre-installed on GHA | ||
#jq | ||
#gh # github cli | ||
#imagemagick | ||
|
||
# for st2 pip build | ||
libldap2-dev | ||
libsasl2-dev | ||
# st2 also installs | ||
#libssl-dev libyaml-dev ldap-utils |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# In CircleCI, we couldn't directly install imagemagick, so | ||
# we used a workaround from https://discuss.circleci.com/t/error-installing-imagemagick/2963 | ||
# TODO: determine if we should go back to using imagemagick instead of gmic and optipng | ||
gmic | ||
optipng |
Oops, something went wrong.