Skip to content

Commit

Permalink
ci: wait for other runs before doing anything else
Browse files Browse the repository at this point in the history
  • Loading branch information
89luca89 committed Jul 6, 2021
1 parent 716141a commit 407c587
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions .github/workflows/ansible-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ jobs:
inventories: ${{ steps.output-inventories.outputs.inventories }}
steps:

- uses: actions/checkout@v2

- name: Install SSH Key
uses: shimataro/ssh-key-action@v2
Expand All @@ -26,16 +25,6 @@ jobs:
- name: Adding Known Hosts
run: ssh-keyscan -p ${{ secrets.SSH_PORT }} -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts

- name: Deploy folder
run: |
ssh ${{ secrets.SSH_OPTIONS }} -p ${{ secrets.SSH_PORT }} -l ${{ secrets.SSH_USER }} ${{ secrets.SSH_HOST }} "mkdir -p ~/${{ github.sha }}"
rsync -aH -e "ssh ${{ secrets.SSH_OPTIONS }} -p ${{ secrets.SSH_PORT }} -l ${{ secrets.SSH_USER }}" ./ ${{ secrets.SSH_HOST }}:~/${{ github.sha }}/
- name: output inventories
id: output-inventories
run: |
echo "::set-output name=inventories::$(find examples/inventory-test-* | sort -u | jq -R -s -c 'split("\n")[:-1]')"
- name: Wait for other runs to stop
run: |
while true; do
Expand All @@ -49,6 +38,18 @@ jobs:
fi
done
- uses: actions/checkout@v2

- name: Deploy folder
run: |
ssh ${{ secrets.SSH_OPTIONS }} -p ${{ secrets.SSH_PORT }} -l ${{ secrets.SSH_USER }} ${{ secrets.SSH_HOST }} "mkdir -p ~/${{ github.sha }}"
rsync -aH -e "ssh ${{ secrets.SSH_OPTIONS }} -p ${{ secrets.SSH_PORT }} -l ${{ secrets.SSH_USER }}" ./ ${{ secrets.SSH_HOST }}:~/${{ github.sha }}/
- name: output inventories
id: output-inventories
run: |
echo "::set-output name=inventories::$(find examples/inventory-test-* | sort -u | jq -R -s -c 'split("\n")[:-1]')"
run:

# Run the test inside a centos8 container
Expand Down

0 comments on commit 407c587

Please sign in to comment.