Skip to content

Commit 133f631

Browse files
Copilotbook000
andauthored
feat: ARM64 標準ランナーをプライベートリポジトリで利用可能にする (#329)
* Initial plan * feat: ARM64 標準ランナーをプライベートリポジトリで利用可能にする Co-authored-by: book000 <8929706+book000@users.noreply.github.com> * chore: package.json を .gitignore に追加 Co-authored-by: book000 <8929706+book000@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: book000 <8929706+book000@users.noreply.github.com>
1 parent 8d31c6f commit 133f631

File tree

2 files changed

+3
-26
lines changed

2 files changed

+3
-26
lines changed

.github/workflows/reusable-docker.yml

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,6 @@ jobs:
8383
targets-matrix: ${{ steps.targets-matrix.outputs.matrix }}
8484
# パッケージのアップロードが必要かどうか
8585
need-upload: ${{ steps.need-upload.outputs.need-upload }}
86-
# リポジトリがプライベートかどうか
87-
is-private-repo: ${{ steps.check-repo-visibility.outputs.is-private }}
8886

8987
steps:
9088
- name: 📥 Check out the repo
@@ -94,19 +92,6 @@ jobs:
9492
ref: ${{ inputs.is-merged == true && github.base_ref || inputs.pr-head-sha }}
9593
fetch-depth: 0
9694

97-
- name: 🔍 Check repository visibility
98-
id: check-repo-visibility
99-
uses: actions/github-script@v8
100-
with:
101-
script: |
102-
const repo = await github.rest.repos.get({
103-
owner: context.repo.owner,
104-
repo: context.repo.repo
105-
});
106-
const isPrivate = repo.data.private;
107-
core.setOutput('is-private', isPrivate);
108-
core.info(`Repository is ${isPrivate ? 'private' : 'public'}`);
109-
11095
- name: 🏷️ Bump version and push tag
11196
id: tag-version
11297
uses: mathieudutour/github-tag-action@v6.2
@@ -154,9 +139,8 @@ jobs:
154139
# Dockerイメージをビルドする
155140
build:
156141
name: Docker build (${{ matrix.target.packageName }}, ${{ matrix.platform }})
157-
# matrix.platform が linux/arm64 かつ パブリックリポジトリの場合は ubuntu-24.04-arm を使う。それ以外の場合は ubuntu-latest を使う
158-
# プライベートリポジトリでは ubuntu-24.04-arm が利用できないため、ubuntu-latest を使う
159-
runs-on: ${{ matrix.platform == 'linux/arm64' && needs.calc-version.outputs.is-private-repo == 'false' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
142+
# matrix.platform が linux/arm64 の場合は ubuntu-24.04-arm を使う。それ以外の場合は ubuntu-latest を使う
143+
runs-on: ${{ matrix.platform == 'linux/arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
160144
needs: calc-version
161145

162146
strategy:
@@ -201,14 +185,6 @@ jobs:
201185
# マージされていない時には github.event.pull_request.head.sha を使い、マージされた時にはgithub.base_refを使う
202186
ref: ${{ inputs.is-merged == true && github.base_ref || inputs.pr-head-sha }}
203187

204-
- name: 🛠️ Set up QEMU
205-
# QEMU はクロスコンパイル時のみ必要。ネイティブビルド時はスキップする
206-
# - linux/amd64 を ubuntu-latest (amd64) でビルドする場合は不要
207-
# - linux/arm64 を ubuntu-24.04-arm (arm64) でビルドする場合は不要
208-
# - linux/arm64 をプライベートリポジトリで ubuntu-latest (amd64) でビルドする場合のみ必要
209-
if: matrix.platform == 'linux/arm64' && needs.calc-version.outputs.is-private-repo == 'true'
210-
uses: docker/setup-qemu-action@v3
211-
212188
- name: 🐳 Set up Docker Buildx
213189
uses: docker/setup-buildx-action@v3
214190

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ test-scenarios/*/.env.local
1212

1313
# Dependencies installed for scripts
1414
node_modules/
15+
package.json
1516
package-lock.json

0 commit comments

Comments
 (0)