diff --git a/content/docs/cml-with-dvc.md b/content/docs/cml-with-dvc.md index 3191dbf0..a37ef423 100644 --- a/content/docs/cml-with-dvc.md +++ b/content/docs/cml-with-dvc.md @@ -19,7 +19,7 @@ jobs: steps: - uses: actions/checkout@v3 with: - ref: ${{ github.head_ref || github.ref_name }} + ref: ${{ github.event.pull_request.head.sha || github.sha }} - name: Train model env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} @@ -166,7 +166,7 @@ Windows, Python 3 should be setup first. steps: - uses: actions/checkout@v3 with: - ref: ${{ github.head_ref || github.ref_name }} + ref: ${{ github.event.pull_request.head.sha || github.sha }} - uses: iterative/setup-dvc@v1 ``` @@ -178,7 +178,7 @@ runs-on: windows-latest steps: - uses: actions/checkout@v3 with: - ref: ${{ github.head_ref || github.ref_name }} + ref: ${{ github.event.pull_request.head.sha || github.sha }} - uses: actions/setup-python@v4 with: python-version: '3.x' diff --git a/content/docs/self-hosted-runners.md b/content/docs/self-hosted-runners.md index 1c88da96..eb7f444e 100644 --- a/content/docs/self-hosted-runners.md +++ b/content/docs/self-hosted-runners.md @@ -52,7 +52,7 @@ jobs: - uses: iterative/setup-cml@v1 - uses: actions/checkout@v3 with: - ref: ${{ github.head_ref || github.ref_name }} + ref: ${{ github.event.pull_request.head.sha || github.sha }} - name: Deploy runner on EC2 env: REPO_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} @@ -74,7 +74,7 @@ jobs: steps: - uses: actions/checkout@v3 with: - ref: ${{ github.head_ref || github.ref_name }} + ref: ${{ github.event.pull_request.head.sha || github.sha }} - name: Train model env: REPO_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} @@ -285,7 +285,7 @@ steps: app-id: ${{ secrets.CML_GITHUB_APP_ID }} - uses: actions/checkout@v3 with: - ref: ${{ github.head_ref || github.ref_name }} + ref: ${{ github.event.pull_request.head.sha || github.sha }} token: ${{ steps.get-token.outputs.token }} - name: Train model env: diff --git a/content/docs/start/github.md b/content/docs/start/github.md index 14c6b133..a1931067 100644 --- a/content/docs/start/github.md +++ b/content/docs/start/github.md @@ -33,7 +33,7 @@ $ cd example_cml steps: - uses: actions/checkout@v3 with: - ref: ${{ github.head_ref || github.ref_name }} + ref: ${{ github.event.pull_request.head.sha || github.sha }} - name: Train model env: REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -156,7 +156,7 @@ jobs: - uses: iterative/setup-cml@v1 - uses: actions/checkout@v3 with: - ref: ${{ github.head_ref || github.ref_name }} + ref: ${{ github.event.pull_request.head.sha || github.sha }} - name: Train model env: REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/content/docs/usage.md b/content/docs/usage.md index eead74d0..84b24aac 100644 --- a/content/docs/usage.md +++ b/content/docs/usage.md @@ -30,7 +30,7 @@ jobs: - uses: iterative/setup-cml@v1 - uses: actions/checkout@v3 with: - ref: ${{ github.head_ref || github.ref_name }} + ref: ${{ github.event.pull_request.head.sha || github.sha }} - name: Train model run: | # Your ML workflow goes here diff --git a/src/components/pages/Home/UseCasesSection/index.tsx b/src/components/pages/Home/UseCasesSection/index.tsx index 41c40bf8..15dfba27 100644 --- a/src/components/pages/Home/UseCasesSection/index.tsx +++ b/src/components/pages/Home/UseCasesSection/index.tsx @@ -109,7 +109,7 @@ const UseCasesSection: React.ForwardRefRenderFunction = () => (
steps:
- uses: actions/checkout@v3
with:
-
ref: {"${{ github.head_ref || github.ref_name }}"}
+
ref: {"${{ github.event.pull_request.head.sha || github.sha }}"}
- run: |
pip install -r requirements.txt
@@ -186,7 +186,7 @@ const UseCasesSection: React.ForwardRefRenderFunction = () => (
steps:
- uses: actions/checkout@v3
with:
-
ref: {"${{ github.head_ref || github.ref_name }}"}
+
ref: {"${{ github.event.pull_request.head.sha || github.sha }}"}
- uses: actions/setup-python@v4
with:
python-version: '3.x'
@@ -385,7 +385,7 @@ const UseCasesSection: React.ForwardRefRenderFunction = () => (
steps:
- uses: actions/checkout@v3
with:
-
ref: {"${{ github.head_ref || github.ref_name }}"}
+
ref: {"${{ github.event.pull_request.head.sha || github.sha }}"}
- name: Train model
run: |
@@ -506,7 +506,7 @@ const UseCasesSection: React.ForwardRefRenderFunction = () => (
steps:
- uses: actions/checkout@v3
with:
-
ref: {"${{ github.head_ref || github.ref_name }}"}
+
ref: {"${{ github.event.pull_request.head.sha || github.sha }}"}
- name: Train model
run: |