Skip to content

Commit

Permalink
Update deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
YvesSchoenberg committed Dec 20, 2023
1 parent 094b1c5 commit 6e14bb3
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 35 deletions.
65 changes: 31 additions & 34 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,21 @@ jobs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
has-changes: ${{ steps.set-matrix.outputs.has-changes }}
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
fetch-depth: 0 # Fetch all history for all branches and tags
- uses: actions/checkout@v2
with:
submodules: 'recursive'
fetch-depth: 0 # Fetch all history for all branches and tags

- id: set-matrix
run: |
changed_dirs=$(git diff --name-only HEAD^ HEAD | grep '^actions/' | cut -d'/' -f1-2 | uniq)
if [ -z "$changed_dirs" ]; then
echo "has-changes=false" >> $GITHUB_ENV
echo "matrix=[]" >> $GITHUB_ENV
else
matrix=$(echo "$changed_dirs" | jq -R -s -c 'split("\n")[:-1]')
echo "matrix=$matrix" >> $GITHUB_ENV
echo "has-changes=true" >> $GITHUB_ENV
fi
shell: bash
- id: set-matrix
run: |
changed_dirs=$(git diff --name-only HEAD^ HEAD | grep '^actions/' | cut -d'/' -f1-2 | uniq)
if [ -z "$changed_dirs" ]; then
echo "::set-output name=has-changes::false"
else
matrix=$(echo "$changed_dirs" | jq -R -s -c 'split("\n")[:-1]')
echo "::set-output name=matrix::$matrix"
echo "::set-output name=has-changes::true"
fi
build-and-deploy:
needs: prepare-matrix
Expand All @@ -39,21 +37,20 @@ jobs:
matrix:
action: ${{fromJson(needs.prepare-matrix.outputs.matrix)}}
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Set up Roboto Config
run: |
mkdir -p ~/.roboto
echo '${{ secrets.ROBOTO_CONFIG }}' > ~/.roboto/config.json
- name: Run setup script
run: ${{ matrix.action }}/scripts/setup.sh
- name: Run build script
run: ${{ matrix.action }}/scripts/build.sh
- name: Run deploy script
run: ${{ matrix.action }}/scripts/deploy.sh roboto-public

- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Set up Roboto Config
run: |
mkdir -p ~/.roboto
echo '${{ secrets.ROBOTO_CONFIG }}' > ~/.roboto/config.json
- name: Run setup script
run: ${{ matrix.action }}/scripts/setup.sh
- name: Run build script
run: ${{ matrix.action }}/scripts/build.sh
- name: Run deploy script
run: ${{ matrix.action }}/scripts/deploy.sh roboto-public
2 changes: 1 addition & 1 deletion actions/px4_flight_review/action.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "px4_flight_review",
"description": "This Action creates a .html file with PX4 Flight Plots",
"compute_requirements": {
"vCPU": 512,
"vCPU": 1024,
"memory": 1024,
"storage": 21
},
Expand Down

0 comments on commit 6e14bb3

Please sign in to comment.