Compatibility with FiloSottile/age #569
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
name: Compatibility with FiloSottile/age | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- "setup.*" | |
- "src/**" | |
- ".github/workflows/compatibility.yml" | |
- "Pipfile*" | |
schedule: | |
- cron: "0 0 1 * *" | |
workflow_dispatch: | |
jobs: | |
test: | |
name: Install pyage and age and compare results | |
runs-on: ubuntu-latest | |
env: | |
KEYFILE: ${{ github.workspace }}/testdata/key.txt | |
PUBKEY: age1m2pjpe8zmldysvpp2esn7jw87m7ywk3lncslfwv07vu8wkht438szyhngp | |
steps: | |
- uses: actions/checkout@master | |
- name: Set up Go 1.20 | |
uses: actions/setup-go@v2 | |
with: | |
go-version: "1.20" | |
id: go | |
- name: Install age | |
run: | | |
cd $HOME | |
git clone https://filippo.io/age | |
cd age | |
go build -o . filippo.io/age/cmd/... | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Install pyage | |
run: | | |
cd $GITHUB_WORKSPACE | |
pip install -e '.[dev,test]' | |
- name: "Sanity check: age -> age" | |
run: | | |
echo "Hello Golang sanity." | $HOME/age/age -r $PUBKEY | $HOME/age/age -d -i $KEYFILE | |
- name: "Sanity check: pyage -> pyage" | |
run: | | |
echo "Hello Python sanity." | pyage encrypt $PUBKEY | pyage decrypt $KEYFILE | |
- name: age -> pyage | |
run: | | |
echo "Hello pyage." | $HOME/age/age -r $PUBKEY | pyage decrypt $KEYFILE | |
- name: pyage -> age | |
run: | | |
echo "Hello (go)age." | pyage encrypt $PUBKEY | $HOME/age/age -d -i $KEYFILE | |
- name: Install test SSH-RSA keys | |
run: | | |
mkdir -p $HOME/.ssh | |
cp $GITHUB_WORKSPACE/testdata/test_rsa.pub $HOME/.ssh/id_rsa.pub | |
cp $GITHUB_WORKSPACE/testdata/test_rsa $HOME/.ssh/id_rsa | |
- name: "SSH-RSA: age -> pyage" | |
run: | | |
echo "Hello pyage SSH." | $HOME/age/age -r "$(<$HOME/.ssh/id_rsa.pub)" | pyage decrypt | |
- name: "SSH-RSA: pyage -> age" | |
run: | | |
echo "Hello (go)age SSH." | pyage encrypt $HOME/.ssh/id_rsa.pub | $HOME/age/age -d -i $HOME/.ssh/id_rsa |