|
13 | 13 | - v** |
14 | 14 |
|
15 | 15 | jobs: |
16 | | - build: |
17 | | - name: Docker |
| 16 | + build-docker: |
| 17 | + name: Build docker image |
18 | 18 | runs-on: ubuntu-latest |
19 | 19 | steps: |
20 | 20 | - uses: actions/checkout@v3 |
21 | | - - name: Login to GitHub Container Registry |
22 | | - uses: docker/login-action@v1 |
23 | | - with: |
24 | | - username: ${{ github.repository_owner }} |
25 | | - password: ${{ secrets.GITHUB_TOKEN }} |
26 | | - registry: ghcr.io |
27 | 21 | - name: Generate Docker meta names |
28 | 22 | uses: docker/metadata-action@v3 |
29 | 23 | id: meta |
30 | 24 | with: |
31 | | - images: ghcr.io/${{ github.repository }} |
| 25 | + images: convictional/trigger-workflow-and-wait |
32 | 26 | tags: | |
33 | 27 | type=ref,event=tag |
34 | 28 | type=raw,enable=${{ !startsWith(github.ref, 'refs/tags/') }},value=master |
35 | 29 | - name: Build Docker image |
36 | 30 | uses: docker/build-push-action@v2 |
37 | 31 | with: |
38 | | - push: ${{ github.event_name != 'pull_request' }} |
| 32 | + push: false |
39 | 33 | tags: ${{ steps.meta.outputs.tags }} |
40 | 34 | labels: ${{ steps.meta.outputs.labels }} |
41 | 35 | context: . |
42 | | - - name: Test |
43 | | - if: ${{ false && github.event_name == 'pull_request' }} |
44 | | - uses: ./ |
45 | | - with: |
46 | | - owner: ${{ github.repository_owner }} |
47 | | - repo: trigger-workflow-and-wait |
48 | | - ref: ${{ github.event.repository.default_branch || 'master' }} |
49 | | - github_token: ${{ secrets.GITHUB_PERSONAL_ACCESS_TOKEN }} |
50 | | - workflow_file_name: selftest.yaml |
51 | | - client_payload: '{"test": "true"}' |
52 | | - wait_interval: 11 |
53 | | - last_workflow_interval: 5 |
54 | | - trigger_workflow: true |
55 | | - wait_workflow: true |
56 | | - propagate_failure: true |
| 36 | + |
| 37 | + self-test: |
| 38 | + name: Run self-test |
| 39 | + runs-on: ubuntu-latest |
| 40 | + steps: |
| 41 | + - uses: actions/checkout@v3 |
| 42 | + - uses: ./ |
| 43 | + with: |
| 44 | + owner: ${{ github.repository_owner }} |
| 45 | + repo: trigger-workflow-and-wait |
| 46 | + ref: ${{ github.event.repository.default_branch || 'master' }} |
| 47 | + github_token: ${{ secrets.GITHUB_PERSONAL_ACCESS_TOKEN }} |
| 48 | + workflow_file_name: selftest.yaml |
| 49 | + client_payload: '{"test": "true"}' |
| 50 | + wait_interval: 11 |
| 51 | + trigger_workflow: true |
| 52 | + wait_workflow: true |
| 53 | + propagate_failure: true |
0 commit comments