-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GitHub Actions Workflow to build and selftest
- Loading branch information
Showing
2 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Build | ||
|
||
on: | ||
pull_request: | ||
paths-ignore: | ||
- '**.md' | ||
push: | ||
paths-ignore: | ||
- '**.md' | ||
branches: | ||
- master | ||
tags: | ||
- v** | ||
|
||
jobs: | ||
build: | ||
name: Docker | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
registry: ghcr.io | ||
- name: Generate Docker meta names | ||
uses: docker/metadata-action@v3 | ||
id: meta | ||
with: | ||
images: ghcr.io/${{ github.repository }} | ||
tags: | | ||
type=ref,event=tag | ||
type=raw,enable=${{ !startsWith(github.ref, 'refs/tags/') }},value=master | ||
- name: Build Docker image | ||
uses: docker/build-push-action@v2 | ||
with: | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
context: . | ||
- name: Test | ||
if: ${{ false && github.event_name == 'pull_request' }} | ||
uses: ./ | ||
with: | ||
owner: ${{ github.repository_owner }} | ||
repo: trigger-workflow-and-wait | ||
ref: ${{ github.event.repository.default_branch || 'master' }} | ||
github_token: ${{ secrets.GITHUB_PERSONAL_ACCESS_TOKEN }} | ||
workflow_file_name: selftest.yaml | ||
client_payload: '{"test": "true"}' | ||
wait_interval: 11 | ||
last_workflow_interval: 5 | ||
trigger_workflow: true | ||
wait_workflow: true | ||
propagate_failure: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Self-test | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
test: | ||
type: boolean | ||
default: false | ||
description: A pointless checkbox. | ||
|
||
jobs: | ||
wait: | ||
name: Wait | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Do nothing | ||
run: sleep 30 |