Skip to content

Commit

Permalink
Rolled back actions/checkout to 4.1.1 as github have withdrawn 4.1.2 …
Browse files Browse the repository at this point in the history
…as it broke everything

actions/checkout#1651
  • Loading branch information
credfeto committed Mar 13, 2024
1 parent cab13bb commit 81853fa
Show file tree
Hide file tree
Showing 9 changed files with 73 additions and 28 deletions.
9 changes: 2 additions & 7 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,9 @@ runs:
core.info('NUGET_ADDITIONAL_RESTORE_FEED_PRERELEASE: ${{inputs.NUGET_ADDITIONAL_RESTORE_FEED_PRERELEASE}}');
core.info('NUGET_PACK: ${{inputs.NUGET_PACK}}');
- name: "Fetch tags and master"
- name: "Set branch"
shell: bash
run: |
git fetch --tags
echo "REF: $GITHUB_REF"
echo "SHA: $GITHUB_SHA"
echo "GIT_BRANCH=$GITHUB_REF" >> "$GITHUB_ENV"
git branch --remote
run: echo "GIT_BRANCH=$GITHUB_REF" >> "$GITHUB_ENV"

- name: "Check file existence"
id: check_files
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/build-and-publish-pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ jobs:
run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE"

- name: "Checkout Source"
uses: actions/[email protected].2
uses: actions/[email protected].1
with:
fetch-depth: 0
fetch-tags: true

- name: "Check Repo Visibility"
uses: credfeto/[email protected]
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/build-and-publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ jobs:
run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE"

- name: "Checkout Source"
uses: actions/[email protected].2
uses: actions/[email protected].1
with:
fetch-depth: 0
fetch-tags: true

- name: "Check Repo Visibility"
uses: credfeto/[email protected]
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/create-prs-for-stale-branches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,12 @@ jobs:
- name: "Ensure JQ is installed"
shell: bash
run: sudo apt install -y jq

- name: "Checkout Source"
uses: actions/[email protected].2
uses: actions/[email protected].1
with:
fetch-depth: 0
fetch-tags: true
ref: main
repository: ${{github.repository}}

Expand Down Expand Up @@ -67,10 +69,12 @@ jobs:
- name: "Initialise Workspace"
shell: bash
run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE"

- name: "Checkout Source"
uses: actions/[email protected].2
uses: actions/[email protected].1
with:
fetch-depth: 0
fetch-tags: true
ref: main
repository: ${{github.repository}}

Expand Down
66 changes: 53 additions & 13 deletions .github/workflows/pr-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@ jobs:
# shell: bash
# run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE"
# - name: "Checkout Source"
# uses: actions/[email protected].2
# uses: actions/[email protected].1
# with:
# fetch-depth: 0
# fetch-tags: true
# - if: |-
# !endsWith(github.repository, '-template')
# && !startsWith(github.head_ref, 'release/')
Expand All @@ -60,14 +61,21 @@ jobs:
- name: "Initialise Workspace"
shell: bash
run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE"
- if: (github.actor != 'dependabot[bot]' && !endsWith(github.repository , '-template'))
uses: actions/[email protected]

- name: "Checkout Source"
if: (github.actor != 'dependabot[bot]' && !endsWith(github.repository , '-template'))
uses: actions/[email protected]
with:
fetch-depth: 0
- if: (github.actor != 'dependabot[bot]' && !endsWith(github.repository , '-template'))
fetch-tags: true

- name: "Diff Changes"
if: (github.actor != 'dependabot[bot]' && !endsWith(github.repository , '-template'))
shell: bash
run: echo "CHANGES=$(git diff --exit-code --no-patch --merge-base origin/main CHANGELOG.md 2> /dev/null && echo 0 || echo $?)" >> "$GITHUB_ENV"
- if: (github.actor != 'dependabot[bot]' && !endsWith(github.repository , '-template')) && env.CHANGES == '0'

- name: "Report unchanged"
if: (github.actor != 'dependabot[bot]' && !endsWith(github.repository , '-template')) && env.CHANGES == '0'
uses: actions/[email protected]
with:
script: |
Expand All @@ -81,16 +89,20 @@ jobs:
- name: "Initialise Workspace"
shell: bash
run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE"

- name: "Checkout Source"
uses: actions/[email protected].2
uses: actions/[email protected].1
with:
fetch-depth: 0
fetch-tags: true

- name: "Get version from global.json"
if: (github.actor != 'dependabot[bot]' && !endsWith(github.repository , '-template'))
uses: credfeto/[email protected]
with:
file: src/global.json
fallback: 8.0.*

- name: "Install dotnet"
if: (github.actor != 'dependabot[bot]' && !endsWith(github.repository , '-template'))
uses: actions/[email protected]
Expand All @@ -111,12 +123,14 @@ jobs:
7.0.*
8.0.*
${{env.DOTNET_VERSION}}
- name: "Check Runner details"
uses: actions/[email protected]
with:
script: |
core.info('Name: ${{runner.name}}');
core.info('OS: ${{runner.os}}');
- name: "Enable Local nuget feeds if caching"
if: startsWith(runner.name, 'buildagent-')
id: nuget-local-cache
Expand All @@ -127,6 +141,7 @@ jobs:
echo "PRERELEASE_BAGET_CACHE=${{vars.PRERELEASE_BAGET_CACHE}}"
echo "RELEASE_BAGET_CACHE=${{vars.RELEASE_BAGET_CACHE}}"
}>> "$GITHUB_OUTPUT"
- name: "Configure nuget feeds"
if: (github.actor != 'dependabot[bot]' && !endsWith(github.repository , '-template'))
uses: ./.github/actions/nuget
Expand All @@ -137,6 +152,7 @@ jobs:
NUGET_ADDITIONAL_RESTORE_FEED_PRERELEASE_CACHE: ""
NUGET_ADDITIONAL_RESTORE_FEED_RELEASE: ${{vars.NUGET_ADDITIONAL_RESTORE_FEED_RELEASE}}
NUGET_ADDITIONAL_RESTORE_FEED_PRERELEASE: ""

- name: "Enable dotnet tools"
if: (github.actor != 'dependabot[bot]' && !endsWith(github.repository , '-template'))
shell: bash
Expand All @@ -151,12 +167,14 @@ jobs:
DOTNET_TC_QuickJitForLoops: "1"
DOTNET_TieredPGO: "1"
MSBUILDTERMINALLOGGER: "auto"

- name: "Install Changelog tool"
if: (github.actor != 'dependabot[bot]' && !endsWith(github.repository , '-template'))
uses: ./.github/actions/dotnet-tool
with:
TOOL_NAME: Credfeto.ChangeLog.Cmd
TOOL_VERSION: latest

- name: "Check Changelog"
if: (github.actor != 'dependabot[bot]' && !endsWith(github.repository , '-template'))
shell: bash
Expand All @@ -179,10 +197,13 @@ jobs:
- name: "Initialise Workspace"
shell: bash
run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE"

- name: "Checkout Source"
uses: actions/[email protected].2
uses: actions/[email protected].1
with:
fetch-depth: 0
fetch-tags: true

- name: "Check for leaks"
uses: DariuszPorowski/[email protected]
id: gitleaks
Expand All @@ -201,10 +222,13 @@ jobs:
- name: "Initialise Workspace"
shell: bash
run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE"

- name: "Checkout Source"
uses: actions/[email protected].2
uses: actions/[email protected].1
with:
fetch-depth: 0
fetch-tags: true

- name: "Check for merge conflicts"
uses: olivernybroe/[email protected]

Expand All @@ -215,10 +239,13 @@ jobs:
- name: "Initialise Workspace"
shell: bash
run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE"

- name: "Checkout Source"
uses: actions/[email protected].2
uses: actions/[email protected].1
with:
fetch-depth: 0
fetch-tags: true

- name: "Check for case conflicts"
uses: credfeto/[email protected]

Expand All @@ -229,10 +256,13 @@ jobs:
- name: "Initialise Workspace"
shell: bash
run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE"

- name: "Checkout Source"
uses: actions/[email protected].2
uses: actions/[email protected].1
with:
fetch-depth: 0
fetch-tags: true

- name: "Check for ignored files"
uses: credfeto/[email protected]

Expand All @@ -244,18 +274,22 @@ jobs:
- name: "Initialise Workspace"
shell: bash
run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE"

- uses: credfeto/[email protected]
id: visibility
with:
# optional parameter defaults to the current repo
repository: ${{github.repository}}
# optional parameter defaults to the current user
token: ${{github.token}}

- name: "Checkout Source"
if: steps.visibility.outputs.is_public == 'true'
uses: actions/[email protected].2
uses: actions/[email protected].1
with:
fetch-depth: 0
fetch-tags: true

- name: 'Dependency Review'
if: steps.visibility.outputs.is_public == 'true'
uses: actions/[email protected]
Expand All @@ -268,10 +302,13 @@ jobs:
- name: "Initialise Workspace"
shell: bash
run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE"

- name: "Checkout Source"
uses: actions/[email protected].2
uses: actions/[email protected].1
with:
fetch-depth: 0
fetch-tags: true

- name: "Check for merge commits"
uses: greenled/[email protected]

Expand All @@ -284,10 +321,13 @@ jobs:
- name: "Initialise Workspace"
shell: bash
run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE"

- name: "Checkout Source"
uses: actions/[email protected].2
uses: actions/[email protected].1
with:
fetch-depth: 0
fetch-tags: true

- name: "Run Linter"
uses: github/[email protected]
env:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,10 @@ jobs:
run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE"

- name: "Checkout source"
uses: actions/[email protected].2
uses: actions/[email protected].1
with:
fetch-depth: 1
fetch-tags: true

- name: "Find PR For branch"
uses: juliangruber/[email protected]
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/reformat-sql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ jobs:
run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE"

- name: "Checkout Source"
uses: actions/[email protected].2
uses: actions/[email protected].1
with:
fetch-depth: 0
fetch-tags: true
token: ${{secrets.SOURCE_PUSH_TOKEN}}

- name: "Reformat"
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/reformat-yaml.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ jobs:
run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE"

- name: "Checkout Source"
uses: actions/[email protected].2
uses: actions/[email protected].1
with:
fetch-depth: 0
fetch-tags: true
token: ${{secrets.SOURCE_PUSH_TOKEN}}

- name: "Reformat"
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/update-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ jobs:
shell: bash
run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE"
- name: "Checkout Source"
uses: actions/[email protected].2
uses: actions/[email protected].1
with:
fetch-depth: 0
fetch-tags: true
token: ${{secrets.SOURCE_PUSH_TOKEN}}
- name: "Update Github label config"
if: success()
Expand Down

0 comments on commit 81853fa

Please sign in to comment.