ci #77
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: ci | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ "main" ] | |
paths: [ "input/**" ] | |
pull_request: | |
branches: [ "main" ] | |
paths: [ "input/**" ] | |
env: | |
GH_TOKEN: ${{ github.token }} | |
jobs: | |
convert-test-files: | |
runs-on: ubuntu-latest | |
permissions: write-all | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Convert polarion files | |
run: | | |
gh release download wip --pattern 'gpc' | |
chmod +x gpc | |
./gpc ./input/filelist.txt ./output | |
rm gpc | |
- name: Commit changes in conversion output | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: generated by gpc | |
commit_user_name: volkerdoerr | |
commit_user_email: [email protected] | |
commit_author: Volker Doerr <[email protected]> | |
commit_options: '--signoff' | |
update-tag: | |
runs-on: ubuntu-latest | |
needs: convert-test-files | |
permissions: write-all | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: rickstaa/action-create-tag@v1 | |
with: | |
tag: "wip" | |
message: "rolling: work in progress" | |
force_push_tag: true | |
convert-production-files: | |
needs: update-tag | |
runs-on: ubuntu-latest | |
permissions: write-all | |
steps: | |
- name: Convert polarion files from gemspec.dev.ccs.gematik.solutions/docs/ | |
run: | | |
gh release download wip --pattern 'gpc' | |
chmod +x gpc | |
mkdir -p ./output | |
./gpc https://gemspec.dev.ccs.gematik.solutions/docs/filelist.txt ./output | |
rm gpc | |
- name: Deploy conversion output to gemspec.online | |
run: | | |
mkdir ~/.ssh | |
ssh-keyscan -H ssh.strato.de >> ~/.ssh/known_hosts | |
sshpass -p ${{secrets.SFTP_PASSWORD}} sftp ${{secrets.SFTP_USERNAME}}@ssh.strato.de << ! | |
PUT -R ./output/* | |
BYE | |
! | |