/// BANGBOO BLOG ///

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31

December 27, 2024

GitHub Actions
ChatGPTかGeminiかに聞けば良さそう

■GitHub Actionsの動作内容はリポジトリ内に設定されている.github/workflows内縺?YMLにある
steps:
- name: Checkout
  uses: actions/checkout@v4

@以臀??はバージョン、特藹??のコミットSHAにもできる @3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4
Commits · actions/checkout · GitHub
onセクション縺?PushやPR作成やスケジュール藹??行等のトリガーや対象ブランチやパス軆??も書かれている
Secretsや環藹??変数は、Terraformでクラウドプロバイダーにアクセスする場合等で、GitHub Actions縺?secrets で鐔??証情報が設藹??されていることが多い。これらはリポジトリ縺?Settings > Secrets and variables > Actions で確認可能。
GitHub Actions でのシークレットの使逕? - GitHub Docs

name: Deploy Terraform

on:
push:
branches:
- main #この場合、mainブランチへ縺?pushでトリガーされる

jobs:
terraform:
runs-on: ubuntu-latest
steps:
- name: Checkout code
  uses: actions/checkout@v3
- name: Setup Terraform
  uses: hashicorp/setup-terraform@v2
  with:
terraform_version: 1.4.0
- name: Initialize Terraform
  run: terraform init
- name: Apply Terraform
  run: terraform apply-auto-approve #terraform planなしじゃ
twitter
Hatena
Google Buzz
newsing
Yahoo!
Buzzurl
Technorati
del.icio.us
Choix
Iza!
Livedoor Clip
Facebook
Evernote
 

Posted by funa : 09:25 PM | Web | Comment (0) | Trackback (0)