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+ name : Build and publish ipmi-sim
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ paths :
8+ - ' ipmi_sim/**'
9+ - ' ipmi_sim/VERSION'
10+ workflow_dispatch :
11+
12+ permissions :
13+ contents : read
14+ packages : write
15+
16+ jobs :
17+ build :
18+ runs-on : ubuntu-latest
19+ steps :
20+ - name : Check out the repo
21+ uses : actions/checkout@v6
22+
23+ - name : Read version
24+ id : version
25+ run : echo "version=$(cat ipmi_sim/VERSION)" >> "$GITHUB_OUTPUT"
26+
27+ - name : Set up Docker Buildx
28+ uses : docker/setup-buildx-action@v4
29+
30+ - name : Docker Login
31+ uses : docker/login-action@v4
32+ with :
33+ registry : ghcr.io
34+ username : ${{ github.actor }}
35+ password : ${{ secrets.GITHUB_TOKEN }}
36+
37+ - name : Docker metadata
38+ id : meta
39+ uses : docker/metadata-action@v6
40+ with :
41+ images : ghcr.io/openchami/ipmi-sim
42+ tags : |
43+ type=raw,value=latest,enable={{is_default_branch}}
44+ type=raw,value=${{ steps.version.outputs.version }}
45+ type=sha,prefix=,format=short
46+
47+ - name : Build and push
48+ uses : docker/build-push-action@v7
49+ with :
50+ context : ipmi_sim
51+ push : true
52+ tags : ${{ steps.meta.outputs.tags }}
53+ labels : ${{ steps.meta.outputs.labels }}
54+ cache-from : type=gha
55+ cache-to : type=gha,mode=max
Original file line number Diff line number Diff line change 1+ 0.1.0
You can’t perform that action at this time.
0 commit comments