Skip to content

Commit 034dc6e

Browse files
committed
feat: docker workflow added
MR #1
1 parent 1e61b13 commit 034dc6e

File tree

3 files changed

+651
-0
lines changed

3 files changed

+651
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
---
2+
3+
name: 'CI'
4+
5+
6+
on:
7+
# workflow_call:
8+
# inputs:
9+
# build-branch: # tag / dev
10+
# required: true
11+
# type: string
12+
push:
13+
branches:
14+
- '**'
15+
tags:
16+
- '*'
17+
pull_request:
18+
branches:
19+
- '**'
20+
21+
22+
# env:
23+
# DOCKER_BUILD_IMAGE: "ghcr.io/${{ github.repository }}-fred:${{ github.sha }}"
24+
25+
26+
# permissions:
27+
# pull-requests: write
28+
# contents: read
29+
# actions: read
30+
# checks: write
31+
# packages: write
32+
# security-events: write
33+
# statuses: write
34+
35+
36+
37+
jobs:
38+
39+
40+
41+
docker-changed:
42+
if:
43+
(
44+
github.event.pull_request
45+
||
46+
github.event.push
47+
||
48+
github.ref_type == 'tag'
49+
)
50+
runs-on: ubuntu-latest
51+
name: Docker Changed Check
52+
outputs:
53+
feature: ${{ steps.changes-feature.outputs.src }}
54+
development: ${{ steps.changes-development.outputs.src }}
55+
steps:
56+
57+
58+
- uses: actions/checkout@v4
59+
60+
61+
- uses: dorny/paths-filter@v3
62+
name: Development Changes
63+
if:
64+
(
65+
github.ref_name == 'development'
66+
)
67+
id: changes-development
68+
with:
69+
ref: master
70+
filters: |
71+
src:
72+
- '.github/workflows/docker.yaml'
73+
74+
75+
- uses: dorny/paths-filter@v3
76+
name: Feature Branch
77+
if:
78+
(
79+
github.ref_name != 'development'
80+
&&
81+
github.ref_name != 'master'
82+
)
83+
id: changes-feature
84+
with:
85+
ref: development
86+
filters: |
87+
src:
88+
- '.github/workflows/docker.yaml'
89+
90+
91+
92+
docker-check:
93+
needs: docker-changed
94+
name: 'Docker'
95+
if:
96+
(
97+
needs.docker-changed.outputs.feature == 'true'
98+
||
99+
needs.docker-changed.outputs.development == 'true'
100+
)
101+
uses: ./.github/workflows/docker.yaml
102+
with:
103+
DOCKER_BUILD_IMAGE_NAME: "nofusscomputing/workflow-docker"
104+
DOCKER_PUBLISH_IMAGE_NAME: "nofusscomputing/workflow-docker-publish"
105+
DOCKER_PUBLISH_REGISTRY: "ghcr.io"
106+
107+
108+
109+
# release:
110+
# name: 'Release'
111+
# uses: nofusscomputing/scratchpad/.github/workflows/release.yaml@further-testing
112+
# # with:
113+
# # DOCKER_BUILD_IMAGE_NAME: "${{ github.repository }}"

0 commit comments

Comments
 (0)