<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>sue445</author_name>
  <author_url>https://blog.hatena.ne.jp/sue445/</author_url>
  <blog_title>くりにっき</blog_title>
  <blog_url>https://sue445.hatenablog.com/</blog_url>
  <categories>
    <anon>GitHubActions</anon>
  </categories>
  <description>tl;dr; environment を三項演算子でいい感じにする モチベーション TerraformのワークフローをGitHub Actionsで動かしてるんだけど、terraform apply した時（具体的にはmainブランチか手動でのbuild実行時 *1 ）のみ environment をセットしてDeployments *2に通知したかった。（ terraform plan （Terraformのdry run）ではDeploymentsには通知したくない） 実装例 こんな感じ。 environment: ${{ ((github.ref == 'refs/heads/main'…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsue445.hatenablog.com%2Fentry%2F2023%2F02%2F05%2F161239&quot; title=&quot;GitHub Actionsで特定の条件の時だけenvironmentを設定したい - くりにっき&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/s/sue445/20230205/20230205160648.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2023-02-05 16:12:39</published>
  <title>GitHub Actionsで特定の条件の時だけenvironmentを設定したい</title>
  <type>rich</type>
  <url>https://sue445.hatenablog.com/entry/2023/02/05/161239</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
