From 0388bbf50a6e1057c94ea36902566a97406bd566 Mon Sep 17 00:00:00 2001 From: Caleb Cushing Date: Fri, 18 Oct 2024 10:40:16 -0400 Subject: [PATCH] ci: change how publish checks out refs (#33) * build: another publish take * build: formatting consistency --- .github/workflows/build.yml | 2 +- .github/workflows/gh-publish.yml | 10 ++++------ .github/workflows/gp-publish.yml | 2 +- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c361b54..74a5632 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Build +name: build on: [push, workflow_call] jobs: build: diff --git a/.github/workflows/gh-publish.yml b/.github/workflows/gh-publish.yml index 53942d3..93f2d86 100644 --- a/.github/workflows/gh-publish.yml +++ b/.github/workflows/gh-publish.yml @@ -1,11 +1,9 @@ name: publish-to-github-packages on: workflow_run: - workflows: ["Build"] - types: - - completed - branches: - - main + workflows: [build] + types: [completed] + branches: [main] jobs: publish: if: github.event.workflow_run.conclusion == 'success' @@ -19,7 +17,7 @@ jobs: steps: - uses: actions/checkout@v4 with: - ref: ${{ github.event.workflow_run.head_commit.id }} + ref: ${{ github.event.workflow_run.head_branch}} - uses: actions/setup-java@v4 with: distribution: temurin diff --git a/.github/workflows/gp-publish.yml b/.github/workflows/gp-publish.yml index 9166694..cafa7f5 100644 --- a/.github/workflows/gp-publish.yml +++ b/.github/workflows/gp-publish.yml @@ -18,7 +18,7 @@ jobs: steps: - uses: actions/checkout@v4 with: - ref: ${{ github.event.workflow_run.head_commit.id }} + ref: ${{ github.event.workflow_run.head_branch }} - uses: actions/setup-java@v4 with: distribution: temurin