Skip to content

Commit

Permalink
fix(CI): checkout head ref
Browse files Browse the repository at this point in the history
Signed-off-by: Cameron Smith <[email protected]>
  • Loading branch information
cameronraysmith committed Dec 27, 2023
1 parent 8c25192 commit 3bf6497
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || github.ref }}

- name: Create Flyte config from YAML template
id: yq-process
Expand Down Expand Up @@ -149,6 +151,8 @@ jobs:
echo "MODE=${{ needs.set-variables.outputs.mode }}"
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || github.ref }}

- name: Setup environment
uses: ./.github/actions/setup_environment
Expand Down Expand Up @@ -192,6 +196,8 @@ jobs:
contents: read
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || github.ref }}
- uses: DeterminateSystems/nix-installer-action@v9
- uses: DeterminateSystems/magic-nix-cache-action@v2
- run: nix flake check --impure --accept-flake-config
Expand Down Expand Up @@ -225,6 +231,8 @@ jobs:
url: https://ghcr.io/sciexp/flytezendev
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || github.ref }}
- uses: docker/setup-qemu-action@v3
with:
platforms: arm64
Expand Down Expand Up @@ -259,8 +267,7 @@ jobs:
NIX_IMAGE_SYSTEMS: "x86_64-linux"

execute-workflow:
# needs: [config-workflows, build-nix-images, set-variables]
needs: [config-workflows, set-variables]
needs: [config-workflows, build-nix-images, set-variables]
if: ${{ needs.set-variables.outputs.skip_ci != 'true' && (contains(github.event.pull_request.labels.*.name, 'execute-workflow') || (github.event_name == 'workflow_dispatch' && inputs.run_execute_workflow)) }}
runs-on: ubuntu-latest
concurrency:
Expand Down Expand Up @@ -293,7 +300,7 @@ jobs:
path: .flyte/

- name: Setup tmate debug session
# if: ${{ inputs.debug_enabled == 'true' }}
if: ${{ inputs.debug_enabled == 'true' }}
uses: mxschmitt/action-tmate@v3

- name: Execute workflow
Expand Down

0 comments on commit 3bf6497

Please sign in to comment.