|
18 | 18 | env: |
19 | 19 | PRIVATE_IMAGE: ${{ vars.PRIVATE_IMAGE || 'smashedr/alpine-private:latest' }} |
20 | 20 |
|
| 21 | +concurrency: |
| 22 | + group: ${{ github.workflow }} |
| 23 | + cancel-in-progress: true |
| 24 | + |
21 | 25 | jobs: |
22 | 26 | test: |
23 | 27 | name: "Test" |
24 | 28 | if: ${{ !contains(github.event.head_commit.message, '#notest') }} |
25 | 29 | runs-on: ubuntu-latest |
26 | 30 | timeout-minutes: 5 |
27 | | - concurrency: |
28 | | - group: ${{ github.workflow }} |
29 | | - cancel-in-progress: true |
30 | 31 |
|
31 | 32 | steps: |
32 | 33 | - name: "Checkout" |
|
82 | 83 | registry_pass: ${{ secrets.DOCKER_HUB_PASS }} |
83 | 84 | summary: false |
84 | 85 |
|
| 86 | + - name: "3: Write YAML" |
| 87 | + if: ${{ !cancelled() && !github.event.act }} |
| 88 | + uses: teunmooij/yaml@v1 |
| 89 | + with: |
| 90 | + to-file: "docker-compose.yaml" |
| 91 | + data: | |
| 92 | + {"version":"3.8","services":{"alpine":{"image":"alpine:latest","command":"tail -f /dev/null"}}} |
| 93 | +
|
| 94 | + - name: "3: Test Compose" |
| 95 | + if: ${{ !cancelled() && !github.event.act }} |
| 96 | + uses: ./ |
| 97 | + with: |
| 98 | + name: test_stack-deploy-compose |
| 99 | + file: docker-compose.yaml |
| 100 | + host: ${{ secrets.DOCKER_HOST }} |
| 101 | + port: ${{ secrets.DOCKER_PORT }} |
| 102 | + user: ${{ secrets.DOCKER_USER }} |
| 103 | + pass: ${{ secrets.DOCKER_PASS }} |
| 104 | + #ssh_key: ${{ secrets.DOCKER_SSH_KEY }} |
| 105 | + mode: compose |
| 106 | + summary: false |
| 107 | + |
| 108 | + - name: "4: Write YAML" |
| 109 | + if: ${{ !cancelled() }} |
| 110 | + uses: teunmooij/yaml@v1 |
| 111 | + with: |
| 112 | + to-file: "docker-compose.yaml" |
| 113 | + data: | |
| 114 | + {"version":"3.8","services":{"alpine":{"image":"${{ env.PRIVATE_IMAGE }}","command":"tail -f /dev/null"}}} |
| 115 | +
|
| 116 | + - name: "4: Test Compose SSH and Auth" |
| 117 | + if: ${{ !cancelled() }} |
| 118 | + uses: ./ |
| 119 | + with: |
| 120 | + name: test_stack-deploy-compose |
| 121 | + file: docker-compose.yaml |
| 122 | + host: ${{ secrets.DOCKER_HOST }} |
| 123 | + port: ${{ secrets.DOCKER_PORT }} |
| 124 | + user: ${{ secrets.DOCKER_USER }} |
| 125 | + #pass: ${{ secrets.DOCKER_PASS }} |
| 126 | + ssh_key: ${{ secrets.DOCKER_SSH_KEY }} |
| 127 | + mode: compose |
| 128 | + registry_user: ${{ vars.DOCKER_HUB_USER }} |
| 129 | + registry_pass: ${{ secrets.DOCKER_HUB_PASS }} |
| 130 | + |
85 | 131 | - name: "Schedule Failure Notification" |
86 | 132 | if: ${{ failure() && github.event_name == 'schedule' }} |
87 | 133 | uses: sarisia/actions-status-discord@v1 |
|
0 commit comments