diff --git a/.github/workflows/plan.yml b/.github/workflows/plan.yml index 3446010..d6cbcb0 100644 --- a/.github/workflows/plan.yml +++ b/.github/workflows/plan.yml @@ -5,6 +5,10 @@ on: branches: - main workflow_dispatch: + workflow_call: + secrets: + GOOGLE_BACKEND_CREDENTIALS: + required: true permissions: pull-requests: write @@ -18,6 +22,7 @@ env: jobs: validate: + needs: ["fmt"] runs-on: ubuntu-latest steps: - name: Checkout code @@ -38,9 +43,14 @@ jobs: fmt: runs-on: ubuntu-latest + permissions: + contents: write steps: - name: Checkout code uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{ github.head_ref }} - name: Setup Terraform uses: hashicorp/setup-terraform@v3 @@ -48,9 +58,26 @@ jobs: terraform_version: ${{ env.TERRAFORM_VERSION }} - name: Terraform fmt - run: terraform fmt -check -diff -recursive . + id: fmt + run: terraform fmt -diff -no-color -recursive . + + - name: Exit if trigger is workflow_dispatch and fmt failed # workflow_dispatchからの実行ではコミットしない + if: github.event_name == 'workflow_dispatch' + env: + TF_FMT_OUTPUT: ${{ steps.fmt.outputs.stdout }} + run: test -z "$TF_FMT_OUTPUT" + + - name: Commit changes + if: steps.fmt.outputs.stdout != '' + run: | + git config user.name github-actions[bot] + git config user.email 41898282+github-actions[bot]@users.noreply.github.com + git add . + git commit -m '[CI] terraform fmt' + git push origin HEAD:${{ github.event.pull_request.head.ref }} plan: + needs: ["fmt"] runs-on: ubuntu-latest steps: - name: Checkout code diff --git a/members.tf b/members.tf index 04de136..bb76485 100644 --- a/members.tf +++ b/members.tf @@ -19,6 +19,7 @@ locals { "ayanakm", # ayana "beferia", # beferia "blancnoir256", # BN256 + "cho3881392697", # cho "cobalt1024", # cobalt "comavius", # comavius "cp-20", # cp20 @@ -26,6 +27,7 @@ locals { "emura0", # emura "eran1515", # Eran "eyerust", # michadaniel + "Eraxyso", # Eraxyso "ErrorSyntax1", # SyntaxError "eyemono-moe", # d_etteiu8383 "Futadaruma", # Futadaruma @@ -82,6 +84,7 @@ locals { "oER4", # o_ER4 "ogu-kazemiya", # ogu_kazemiya "oribe1115", # oribe + "parahailob", # malfisto "penguin23-001", # penguin23 "Pentakon26", # Pentakon "pikachu0310", # pikachu @@ -89,6 +92,7 @@ locals { "pirosiki197", # pirosiki "PL-38", # PL-38 "Propromp", # matsun + "PonponJuice", # Ponjuice "Pugma", # Pugma "ramdos0207", # ramdos "ras0q", # Ras @@ -104,6 +108,7 @@ locals { "Series-205", # Series_205 "sh0go07", # shogotin "shibutomo", # Mozuya + "shobonvip", # shobon "shushuya0210", # eru_o2lo "shota973", # shota_s "Silent-Clubstep", # shunapo @@ -135,6 +140,7 @@ locals { "ynta-3", # Hokaze "yuchi-cpu", # u "YuHima03", # tidus + "yuiveslkao", # Naru820 "Yuki-Ots", # Umin "yukikurage", # yukikurage "zer0-star", # zer0-star diff --git a/teams.tf b/teams.tf index fdd49af..e6c7acf 100644 --- a/teams.tf +++ b/teams.tf @@ -47,5 +47,15 @@ locals { maintainers = ["ras0q"] description = "2021春ハッカソン" } + + "traOJudge" = { + maintainers = ["kenken714"] + members = [ + "cho3881392697", "comavius", "dye8128", "Eraxyso", "ErrorSyntax1", "hayatroid", "Kaki256", + "kisepichu", "mathsuky", "noya2ruler", "ogu-kazemiya", "parahailob", "PonponJuice", + "Pugma", "ramdos0207", "Sotatsu57", "YuHima03", "yuiveslkao", "zer0-star", "ZOI-dayo", "shobonvip", + ] + description = "traO Judge" + } } }