File tree Expand file tree Collapse file tree 2 files changed +59
-0
lines changed
Expand file tree Collapse file tree 2 files changed +59
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Create Docker Image
2+
3+ on :
4+ workflow_call :
5+ inputs :
6+ commit-ish :
7+ description : ' イメージを作りたいワークツリーを持つタグ名やコミットハッシュを指定する'
8+ type : string
9+ required : true
10+ target-component-name :
11+ description : ' 対象とするコンポーネント'
12+ type : string
13+ required : true
14+ workflow_dispatch :
15+ inputs :
16+ commit-ish :
17+ description : ' イメージを作りたいワークツリーを持つタグ名やコミットハッシュを指定する'
18+ type : string
19+ required : true
20+
21+ jobs :
22+ sample-job :
23+ runs-on : ubuntu-latest
24+ steps :
25+ - uses : actions/checkout@v4
26+
27+ - name : Create Docker Image
28+ run : echo "Create Docker Image ${{ inputs.commit-ish }} ${{ inputs.target-component-name }}"
Original file line number Diff line number Diff line change 1+ name : Check Dockerfile Changes and Build
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*'
7+
8+ jobs :
9+ check-dockerfile-changes :
10+ runs-on : ubuntu-latest
11+ outputs :
12+ dockerfile_changed : ${{ steps.check-changes.outputs.dockerfile_changed }}
13+
14+ steps :
15+ - name : Checkout repository
16+ uses : actions/checkout@v4
17+
18+ - name : Check for Dockerfile changes
19+ id : check-changes
20+ run : |
21+ echo "dockerfile_changed=[\"hoge\", \"mogu\"]" >> $GITHUB_OUTPUT
22+
23+ call-docker-build :
24+ needs : check-dockerfile-changes
25+ strategy :
26+ matrix :
27+ target : ${{ fromJson(needs.check-dockerfile-changes.outputs.dockerfile_changed) }}
28+ uses : ./.github/workflows/create-docker-image.yml
29+ with :
30+ target-component-name : ${{ matrix.target }}
31+ commit-ish : ${{ github.ref }}
You can’t perform that action at this time.
0 commit comments