forked from actions/runner
-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gh: update runner fork 2a fast forward
- Loading branch information
Showing
411 changed files
with
24,514 additions
and
6,560 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"name": "Actions Runner Devcontainer", | ||
"image": "mcr.microsoft.com/devcontainers/base:focal", | ||
"features": { | ||
"ghcr.io/devcontainers/features/docker-in-docker:1": {}, | ||
"ghcr.io/devcontainers/features/dotnet": { | ||
"version": "6.0.421" | ||
}, | ||
"ghcr.io/devcontainers/features/node:1": { | ||
"version": "16" | ||
}, | ||
"ghcr.io/devcontainers/features/sshd:1": { | ||
"version": "latest" | ||
} | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"ms-azuretools.vscode-docker", | ||
"ms-dotnettools.csharp", | ||
"eamodio.gitlens" | ||
] | ||
} | ||
}, | ||
"postCreateCommand": "dotnet restore src/Test && dotnet restore src/Runner.PluginHost", | ||
"remoteUser": "vscode" | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "docker" | ||
directory: "/images" | ||
schedule: | ||
interval: "daily" | ||
target-branch: "main" | ||
- package-ecosystem: "nuget" | ||
directory: "/src" | ||
schedule: | ||
interval: "daily" | ||
target-branch: "main" | ||
- package-ecosystem: "npm" | ||
directory: "/src/Misc/expressionFunc/hashFiles" | ||
schedule: | ||
interval: "daily" | ||
target-branch: "main" | ||
allow: | ||
- dependency-type: direct | ||
- dependency-type: production # check only dependencies, which are going to the compiled app, not supporting tools like @vue-cli |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Close Bugs Bot | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 0 * * *' # every day at midnight | ||
jobs: | ||
stale: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/stale@v8 | ||
with: | ||
close-issue-message: "This issue does not seem to be a problem with the runner application, it concerns the GitHub actions platform more generally. Could you please post your feedback on the [GitHub Community Support Forum](https://github.com/orgs/community/discussions/categories/actions) which is actively monitored. Using the forum ensures that we route your problem to the correct team. 😃" | ||
exempt-issue-labels: "keep" | ||
stale-issue-label: "actions-bug" | ||
only-labels: "actions-bug" | ||
days-before-stale: 0 | ||
days-before-close: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Close Features Bot | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 0 * * *' # every day at midnight | ||
jobs: | ||
stale: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/stale@v8 | ||
with: | ||
close-issue-message: "Thank you for your interest in the runner application and taking the time to provide your valuable feedback. We kindly ask you to redirect this feedback to the [GitHub Community Support Forum](https://github.com/orgs/community/discussions/categories/actions-and-packages) which our team actively monitors and would be a better place to start a discussion for new feature requests in GitHub Actions. For more information on this policy please [read our contribution guidelines](https://github.com/actions/runner#contribute). 😃" | ||
exempt-issue-labels: "keep" | ||
stale-issue-label: "actions-feature" | ||
only-labels: "actions-feature" | ||
days-before-stale: 0 | ||
days-before-close: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
name: "DotNet SDK Upgrade" | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * 1' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
dotnet-update: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
SHOULD_UPDATE: ${{ steps.fetch_latest_version.outputs.SHOULD_UPDATE }} | ||
BRANCH_EXISTS: ${{ steps.fetch_latest_version.outputs.BRANCH_EXISTS }} | ||
DOTNET_LATEST_MAJOR_MINOR_PATCH_VERSION: ${{ steps.fetch_latest_version.outputs.DOTNET_LATEST_MAJOR_MINOR_PATCH_VERSION }} | ||
DOTNET_CURRENT_MAJOR_MINOR_VERSION: ${{ steps.fetch_current_version.outputs.DOTNET_CURRENT_MAJOR_MINOR_VERSION }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Get current major minor version | ||
id: fetch_current_version | ||
shell: bash | ||
run: | | ||
current_major_minor_patch_version=$(jq .sdk.version ./src/global.json | xargs) | ||
current_major_minor_version=$(cut -d '.' -f 1,2 <<< "$current_major_minor_patch_version") | ||
echo "DOTNET_CURRENT_MAJOR_MINOR_PATCH_VERSION=${current_major_minor_patch_version}" >> $GITHUB_OUTPUT | ||
echo "DOTNET_CURRENT_MAJOR_MINOR_VERSION=${current_major_minor_version}" >> $GITHUB_OUTPUT | ||
- name: Check patch version | ||
id: fetch_latest_version | ||
shell: bash | ||
run: | | ||
latest_patch_version=$(curl -sb -H "Accept: application/json" "https://dotnetcli.blob.core.windows.net/dotnet/Sdk/${{ steps.fetch_current_version.outputs.DOTNET_CURRENT_MAJOR_MINOR_VERSION }}/latest.version") | ||
current_patch_version=${{ steps.fetch_current_version.outputs.DOTNET_CURRENT_MAJOR_MINOR_PATCH_VERSION }} | ||
should_update=0 | ||
[ "$current_patch_version" != "$latest_patch_version" ] && should_update=1 | ||
# check if git branch already exists for the upgrade | ||
branch_already_exists=0 | ||
if git ls-remote --heads --exit-code origin refs/heads/feature/dotnetsdk-upgrade/${latest_patch_version}; | ||
then | ||
branch_already_exists=1 | ||
should_update=0 | ||
fi | ||
echo "DOTNET_LATEST_MAJOR_MINOR_PATCH_VERSION=${latest_patch_version}" >> $GITHUB_OUTPUT | ||
echo "SHOULD_UPDATE=${should_update}" >> $GITHUB_OUTPUT | ||
echo "BRANCH_EXISTS=${branch_already_exists}" >> $GITHUB_OUTPUT | ||
- name: Create an error annotation if branch exists | ||
if: ${{ steps.fetch_latest_version.outputs.BRANCH_EXISTS == 1 }} | ||
run: echo "::error links::feature/dotnet-sdk-upgrade${{ steps.fetch_latest_version.outputs.DOTNET_LATEST_MAJOR_MINOR_PATCH_VERSION }} https://github.com/actions/runner/tree/feature/dotnet-sdk-upgrade${{ steps.fetch_latest_version.outputs.DOTNET_LATEST_MAJOR_MINOR_PATCH_VERSION }}::Branch feature/dotnetsdk-upgrade/${{ steps.fetch_latest_version.outputs.DOTNET_LATEST_MAJOR_MINOR_PATCH_VERSION }} already exists. Please take a look and delete that branch if you wish to recreate" | ||
- name: Create a warning annotation if no need to update | ||
if: ${{ steps.fetch_latest_version.outputs.SHOULD_UPDATE == 0 && steps.fetch_latest_version.outputs.BRANCH_EXISTS == 0 }} | ||
run: echo "::warning ::Latest DotNet SDK patch is ${{ steps.fetch_latest_version.outputs.DOTNET_LATEST_MAJOR_MINOR_PATCH_VERSION }}, and we are on ${{ steps.fetch_latest_version.outputs.DOTNET_CURRENT_MAJOR_MINOR_PATCH_VERSION }}. No need to update" | ||
- name: Update patch version | ||
if: ${{ steps.fetch_latest_version.outputs.SHOULD_UPDATE == 1 && steps.fetch_latest_version.outputs.BRANCH_EXISTS == 0 }} | ||
shell: bash | ||
run: | | ||
patch_version="${{ steps.fetch_latest_version.outputs.DOTNET_LATEST_MAJOR_MINOR_PATCH_VERSION }}" | ||
current_version="${{ steps.fetch_current_version.outputs.DOTNET_CURRENT_MAJOR_MINOR_PATCH_VERSION }}" | ||
# Update globals | ||
echo Updating globals | ||
globals_temp=$(mktemp) | ||
jq --unbuffered --arg patch_version "$patch_version" '.sdk.version = $patch_version' ./src/global.json > "$globals_temp" && mv "$globals_temp" ./src/global.json | ||
# Update devcontainer | ||
echo Updating devcontainer | ||
devcontainer_temp=$(mktemp) | ||
jq --unbuffered --arg patch_version "$patch_version" '.features."ghcr.io/devcontainers/features/dotnet".version = $patch_version' ./.devcontainer/devcontainer.json > "$devcontainer_temp" && mv "$devcontainer_temp" ./.devcontainer/devcontainer.json | ||
# Update dev.sh | ||
echo Updating start script | ||
sed -i "s/DOTNETSDK_VERSION=\"$current_version\"/DOTNETSDK_VERSION=\"$patch_version\"/g" ./src/dev.sh | ||
- name: GIT commit and push all changed files | ||
if: ${{ steps.fetch_latest_version.outputs.SHOULD_UPDATE == 1 && steps.fetch_latest_version.outputs.BRANCH_EXISTS == 0 }} | ||
id: create_branch | ||
run: | | ||
branch_name="feature/dotnetsdk-upgrade/${{ steps.fetch_latest_version.outputs.DOTNET_LATEST_MAJOR_MINOR_PATCH_VERSION }}" | ||
git config --global user.name "github-actions[bot]" | ||
git config --global user.email "<41898282+github-actions[bot]@users.noreply.github.com>" | ||
git checkout -b $branch_name | ||
git commit -a -m "Upgrade dotnet sdk to v${{ steps.fetch_latest_version.outputs.DOTNET_LATEST_MAJOR_MINOR_PATCH_VERSION }}" | ||
git push --set-upstream origin $branch_name | ||
create-pr: | ||
needs: [dotnet-update] | ||
if: ${{ needs.dotnet-update.outputs.SHOULD_UPDATE == 1 && needs.dotnet-update.outputs.BRANCH_EXISTS == 0 }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: feature/dotnetsdk-upgrade/${{ needs.dotnet-update.outputs.DOTNET_LATEST_MAJOR_MINOR_PATCH_VERSION }} | ||
- name: Create Pull Request | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
gh pr create -B main -H feature/dotnetsdk-upgrade/${{ needs.dotnet-update.outputs.DOTNET_LATEST_MAJOR_MINOR_PATCH_VERSION }} --title "Update dotnet sdk to latest version @${{ needs.dotnet-update.outputs.DOTNET_LATEST_MAJOR_MINOR_PATCH_VERSION }}" --body " | ||
https://dotnetcli.blob.core.windows.net/dotnet/Sdk/${{ needs.dotnet-update.outputs.DOTNET_CURRENT_MAJOR_MINOR_VERSION }}/latest.version | ||
--- | ||
Autogenerated by [DotNet SDK Upgrade Workflow](https://github.com/actions/runner/blob/main/.github/workflows/dotnet-upgrade.yml)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Lint | ||
|
||
on: | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
build: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
# Ensure full list of changed files within `super-linter` | ||
fetch-depth: 0 | ||
- name: Run linters | ||
uses: github/super-linter@v4 | ||
env: | ||
DEFAULT_BRANCH: ${{ github.base_ref }} | ||
EDITORCONFIG_FILE_NAME: .editorconfig | ||
LINTER_RULES_PATH: /src/ | ||
VALIDATE_ALL_CODEBASE: false | ||
VALIDATE_CSHARP: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: Publish Runner Image | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
runnerVersion: | ||
type: string | ||
description: Version of the runner being installed | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository_owner }}/actions-runner | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Compute image version | ||
id: image | ||
uses: actions/github-script@v6 | ||
env: | ||
RUNNER_VERSION: ${{ github.event.inputs.runnerVersion }} | ||
with: | ||
script: | | ||
const fs = require('fs'); | ||
const inputRunnerVersion = process.env.RUNNER_VERSION; | ||
if (inputRunnerVersion) { | ||
console.log(`Using input runner version ${inputRunnerVersion}`) | ||
core.setOutput('version', inputRunnerVersion); | ||
return | ||
} | ||
const runnerVersion = fs.readFileSync('${{ github.workspace }}/src/runnerversion', 'utf8').replace(/\n$/g, '') | ||
console.log(`Using runner version ${runnerVersion}`) | ||
core.setOutput('version', runnerVersion); | ||
- name: Setup Docker buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Log into registry ${{ env.REGISTRY }} | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push Docker image | ||
id: build-and-push | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: ./images | ||
platforms: | | ||
linux/amd64 | ||
linux/arm64 | ||
tags: | | ||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.image.outputs.version }} | ||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest | ||
build-args: | | ||
RUNNER_VERSION=${{ steps.image.outputs.version }} | ||
push: true | ||
labels: | | ||
org.opencontainers.image.source=${{github.server_url}}/${{github.repository}} | ||
org.opencontainers.image.description=https://github.com/actions/runner/releases/tag/v${{ steps.image.outputs.version }} | ||
org.opencontainers.image.licenses=MIT |
Oops, something went wrong.