Skip to content

1.1 - Convert to .cupx #16

1.1 - Convert to .cupx

1.1 - Convert to .cupx #16

# Copy file to planeur.net FTP server
name: 1.1 - Convert to .cupx
# Controls when the workflow will run
on:
# Triggers the workflow After the version has been added
workflow_run:
workflows: ["1 - Add version to guide_aires_securite.cup"]
types:
- completed
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
# see: https://github.com/marketplace/actions/ftp-deployment
jobs:
convert-to-cupx:
if: github.ref == 'refs/heads/main' && github.repository == 'planeur-net/outlanding'
name: Convert guide_aires_securite.cup to .cupx
runs-on: ubuntu-latest
steps:
- name: 🚚 Get latest code
uses: actions/checkout@v3
- name: ⚙️ Convert to .cup to .cupx and push to repo
id: convert_to_cupx
run: |
echo "Creating new .cupx file"
zip points.zip guide_aires_securite.cup
zip -r pics.zip Pics
cat pics.zip points.zip > guide_aires_securite.cupx
# push to repo
echo "Pulling latest version before push..."
git pull
# Save commit message for future push
echo "LAST_COMMIT_MESSSAGE=`git log --format=%s -n 1 -- guide_aires_securite.cup`" >> $GITHUB_OUTPUT
- name: ⚙️ Push .cub to repo
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: ${{ steps.convert_to_cupx.outputs.LAST_COMMIT_MESSSAGE }}
file_pattern: 'guide_aires_securite.cupx'