File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ entry: gh-start
2+ nodes:
3+ - id: gh-start
4+ type: core/gh-start@v1
5+ position:
6+ x: 10
7+ y: 10
8+ - id: checkout
9+ type: github.com/actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
10+ position:
11+ x: 430
12+ y: 720
13+ - id: login
14+ type: github.com/docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9
15+ position:
16+ x: 900
17+ y: 720
18+ inputs:
19+ registry: ghcr.io
20+ username: ${{ github.actor }}
21+ password: ${{ github.token }}
22+ - id: build-push
23+ type: >-
24+ github.com/docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83
25+ position:
26+ x: 1280
27+ y: 700
28+ inputs:
29+ push: 'true'
30+ tags: ghcr.io/${{ github.repository }}:latest
31+ connections: []
32+ executions:
33+ - src:
34+ node: gh-start
35+ port: exec-on_push
36+ dst:
37+ node: checkout
38+ port: exec
39+ - src:
40+ node: gh-start
41+ port: exec-on_pull_request
42+ dst:
43+ node: checkout
44+ port: exec
45+ - src:
46+ node: gh-start
47+ port: exec-on_workflow_dispatch
48+ dst:
49+ node: checkout
50+ port: exec
51+ - src:
52+ node: checkout
53+ port: exec-success
54+ dst:
55+ node: login
56+ port: exec
57+ - src:
58+ node: login
59+ port: exec-success
60+ dst:
61+ node: build-push
62+ port: exec
Original file line number Diff line number Diff line change 1+ permissions :
2+ contents : read
3+ packages : write
4+
5+ on :
6+ push :
7+ branches :
8+ - main
9+
10+ pull_request :
11+ branches :
12+ - main
13+
14+ workflow_dispatch :
15+
16+ jobs :
17+ build :
18+ runs-on : ubuntu-latest
19+ name : Build and Push Docker Image
20+ permissions :
21+ contents : read
22+ packages : write
23+ steps :
24+ - name : Run Graph
25+ uses : actionforge/action@866e7df1ce5e84a2b32fda7414812ae72000dae8 # v0.14.6
26+ with :
27+ graph-file : build.act
Original file line number Diff line number Diff line change 1+ .DS_Store
Original file line number Diff line number Diff line change 1+ FROM alpine:3
2+
3+ CMD ["echo" , "Hello, World!" ]
Original file line number Diff line number Diff line change 1+ # example-docker
2+
3+ [ ![ view-action-graph] ( https://img.shields.io/github/actions/workflow/status/actionforge/example-docker/workflow.yml?label=View%20Action%20Graph )] ( https://app.actionforge.dev/github/actionforge/example-docker/main/.github/workflows/graphs/build.act )
4+
5+ A simple Hello World Docker image, built and pushed to ghcr.io using an [ Actionforge] ( https://actionforge.dev ) graph as the CI/CD pipeline.
6+
7+ ## Run
8+
9+ ``` bash
10+ docker build -t hello-world .
11+ docker run hello-world
12+ ```
13+
14+ ## Graph
15+
16+ The build pipeline is defined as an Actionforge graph in [ ` .github/workflows/graphs/build.act ` ] ( .github/workflows/graphs/build.act ) :
17+
18+ ```
19+ checkout -> docker/login-action (ghcr.io) -> docker/build-push-action
20+ ```
21+
22+ It runs on every push to ` main ` , on pull requests, and on manual dispatch.
You can’t perform that action at this time.
0 commit comments