Skip to content

Commit c53a4c8

Browse files
author
Rabih Salamey
authored
Github actions rework (#50)
* dummy change to test PR gha * allow test to be run * remove docker requirement, split out self-test * remove last_workflow_interval
1 parent a169123 commit c53a4c8

File tree

2 files changed

+23
-26
lines changed

2 files changed

+23
-26
lines changed

.github/workflows/build.yaml

Lines changed: 22 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,44 +13,41 @@ on:
1313
- v**
1414

1515
jobs:
16-
build:
17-
name: Docker
16+
build-docker:
17+
name: Build docker image
1818
runs-on: ubuntu-latest
1919
steps:
2020
- 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
2721
- name: Generate Docker meta names
2822
uses: docker/metadata-action@v3
2923
id: meta
3024
with:
31-
images: ghcr.io/${{ github.repository }}
25+
images: convictional/trigger-workflow-and-wait
3226
tags: |
3327
type=ref,event=tag
3428
type=raw,enable=${{ !startsWith(github.ref, 'refs/tags/') }},value=master
3529
- name: Build Docker image
3630
uses: docker/build-push-action@v2
3731
with:
38-
push: ${{ github.event_name != 'pull_request' }}
32+
push: false
3933
tags: ${{ steps.meta.outputs.tags }}
4034
labels: ${{ steps.meta.outputs.labels }}
4135
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

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ inputs:
1212
description: "The repository where the workflow is contained."
1313
required: true
1414
github_token:
15-
description: "The Github access token with access to the repository. Its recommended you put it under secrets."
15+
description: "The Github access token with access to the repository. It is recommended you put this token under secrets."
1616
required: true
1717
github_user:
1818
description: "The name of the github user whose access token is being used to trigger the workflow."

0 commit comments

Comments
 (0)