-
Notifications
You must be signed in to change notification settings - Fork 1
GitHub Container Registry へ push するようにしてみる #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
👀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
みました。
一箇所書きましたが、よさそうです。
file: ./docker/akane-next/Dockerfile | ||
platforms: linux/amd64 | ||
push: ${{ github.head_ref == 'main' }} | ||
tags: ghcr.io/${{ github.repository_owner }}/2025_9/akene-next:latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[may] リポジトリ名をハードコードするのではなく、${{ github.repository }}
コンテキストを使う方が良いかもしれません。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🦀
レビューありがとうございます。ただ出した後にメタデータもうすこしちゃんとできそうだったので後追いコミットします。 |
ひと段落したら再レビュー飛ばしてくれたらみます |
イメージタグにそれぞれ固有の値を持たせるようにしました。(日付とコミットハッシュ) コミットログが多くなっているのはラベルの日付に悪戦苦闘していたのですが、なんとびっくり空白にすると自動的に値が挿入されました |
@taiseiue |
- uses: docker/metadata-action@v4 | ||
id: meta | ||
with: | ||
images: ghcr.io/${{ github.repository_owner }}/${{ github.repository }}/akane-next |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
akane-next
は後から別にもう一つこのリポジトリからアーティファクトが生まれるかもしれないのでつけています
👀 |
ちなみに PR ごとにイメージが Push されまくりますが、 public リポジトリ + ハッカソンで期間が短いので Limit になることはないでしょうと思って push させてます。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
おつかれさまです!
一点だけ、${{ github.repository_owner }}/
を削除してあげてマージしてあげるとよさそうです。
- uses: docker/metadata-action@v4 | ||
id: meta | ||
with: | ||
images: ghcr.io/${{ github.repository_owner }}/${{ github.repository }}/akane-next |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[should] ${{ github.repository }}
でowner/repo
の様な文字列がとれるので、${{ github.repository_owner }}/
は不要です。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🦀 うっかりしてました
# ref: | ||
# - https://github.com/opencontainers/image-spec/blob/fbb4662eb53b80bd38f7597406cf1211317768f0/annotations.md?plain=1#L18-L26 | ||
labels: | | ||
org.opencontainers.image.authors="rokuosan, taiseiue, nenrinyear, Retasusan, ikotome" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[コメント] 外部の標準への準拠助かります。他の人がコードやイメージを見直したときに伝わりやすくなります😊
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
push: true | ||
provenance: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[メモ] GitHub Container Registryへの対応のため、暫定的にprovenance: false
を指定している
@taiseiue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
修正ありがとうございます!
いかにもよさそう
dmdm |
Pull request
❓ 背景 (Why)
本番デプロイを簡単にするために GitHub Container Registry にイメージがあると便利だったので公開したかった。
⛏️ 修正内容 (What)
📸 キャプチャ
👀 懸案事項
🔍 チェック項目
このPRで変更が想定通りうまくいっているかを確認するには...