forked from actions/runner
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from mattrwi/feature/s390x-support-2-314-1-mer…
…ging-b Feature/s390x support 2 314 1 merging b
- Loading branch information
Showing
489 changed files
with
700 additions
and
652 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
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
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
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 |
---|---|---|
|
@@ -11,16 +11,15 @@ jobs: | |
if: startsWith(github.ref, 'refs/heads/releases/') || github.ref == 'refs/heads/main' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
|
||
# Make sure ./releaseVersion match ./src/runnerversion | ||
# Query GitHub release ensure version is not used | ||
- name: Check version | ||
uses: actions/github-script@0.3.0 | ||
uses: actions/github-script@v7 | ||
with: | ||
github-token: ${{secrets.GITHUB_TOKEN}} | ||
script: | | ||
const core = require('@actions/core') | ||
const fs = require('fs'); | ||
const runnerVersion = fs.readFileSync('${{ github.workspace }}/src/runnerversion', 'utf8').replace(/\n$/g, '') | ||
const releaseVersion = fs.readFileSync('${{ github.workspace }}/releaseVersion', 'utf8').replace(/\n$/g, '') | ||
|
@@ -30,7 +29,7 @@ jobs: | |
return | ||
} | ||
try { | ||
const release = await github.repos.getReleaseByTag({ | ||
const release = await github.rest.repos.getReleaseByTag({ | ||
owner: '${{ github.event.repository.owner.name }}', | ||
repo: '${{ github.event.repository.name }}', | ||
tag: 'v' + runnerVersion | ||
|
@@ -53,9 +52,10 @@ jobs: | |
win-arm64-sha: ${{ steps.sha.outputs.win-arm64-sha256 }} | ||
osx-x64-sha: ${{ steps.sha.outputs.osx-x64-sha256 }} | ||
osx-arm64-sha: ${{ steps.sha.outputs.osx-arm64-sha256 }} | ||
linux-s390x-sha: ${{ steps.sha.outputs.linux-s390x-sha256 }} | ||
strategy: | ||
matrix: | ||
runtime: [ linux-x64, linux-arm64, linux-arm, win-x64, osx-x64, osx-arm64, win-arm64 ] | ||
runtime: [ linux-x64, linux-arm64, linux-arm, linux-s390x, win-x64, osx-x64, osx-arm64, win-arm64 ] | ||
include: | ||
- runtime: linux-x64 | ||
os: ubuntu-latest | ||
|
@@ -69,6 +69,10 @@ jobs: | |
os: ubuntu-latest | ||
devScript: ./dev.sh | ||
|
||
- runtime: linux-s390x | ||
os: ubuntu-latest | ||
devScript: ./dev.sh | ||
|
||
- runtime: osx-x64 | ||
os: macOS-latest | ||
devScript: ./dev.sh | ||
|
@@ -87,7 +91,18 @@ jobs: | |
|
||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Get runner version | ||
id: runnerInfo | ||
uses: actions/github-script@v7 | ||
with: | ||
github-token: ${{secrets.GITHUB_TOKEN}} | ||
script: | | ||
const fs = require('fs'); | ||
const runnerVersion = fs.readFileSync('src/runnerversion', 'utf8').replace(/\n$/g, '') | ||
core.setOutput('version', runnerVersion); | ||
core.setOutput('package_name', `actions-runner-${{ matrix.runtime }}-${runnerVersion}${{ startsWith(matrix.runtime, 'win') && '.zip' || '.tar.gz' }}`); | ||
# Build runner layout | ||
- name: Build & Layout Release | ||
|
@@ -106,10 +121,10 @@ jobs: | |
- run: brew install coreutils #needed for shasum util | ||
if: ${{ matrix.os == 'macOS-latest' }} | ||
name: Install Dependencies for SHA Calculation (osx) | ||
|
||
- run: | | ||
file=$(ls) | ||
sha=$(sha256sum $file | awk '{ print $1 }') | ||
echo "Computed sha256: $sha for $file" | ||
sha=$(sha256sum ${{ steps.runnerInfo.outputs.package_name }} | awk '{ print $1 }') | ||
echo "Computed sha256: $sha for ${{ steps.runnerInfo.outputs.package_name }}" | ||
echo "${{matrix.runtime}}-sha256=$sha" >> $GITHUB_OUTPUT | ||
shell: bash | ||
id: sha | ||
|
@@ -126,11 +141,13 @@ jobs: | |
_package | ||
release: | ||
permissions: | ||
contents: write | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
|
||
# Download runner package tar.gz/zip produced by 'build' job | ||
- name: Download Artifact (win-x64) | ||
|
@@ -158,6 +175,11 @@ jobs: | |
with: | ||
name: runner-packages-linux-x64 | ||
path: ./ | ||
- name: Download Artifact (linux-s390x) | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: runner-packages-linux-s390x | ||
path: ./ | ||
- name: Download Artifact (linux-arm) | ||
uses: actions/download-artifact@v4 | ||
with: | ||
|
@@ -172,11 +194,10 @@ jobs: | |
# Create ReleaseNote file | ||
- name: Create ReleaseNote | ||
id: releaseNote | ||
uses: actions/github-script@0.3.0 | ||
uses: actions/github-script@v7 | ||
with: | ||
github-token: ${{secrets.GITHUB_TOKEN}} | ||
script: | | ||
const core = require('@actions/core') | ||
const fs = require('fs'); | ||
const runnerVersion = fs.readFileSync('${{ github.workspace }}/src/runnerversion', 'utf8').replace(/\n$/g, '') | ||
var releaseNote = fs.readFileSync('${{ github.workspace }}/releaseNote.md', 'utf8').replace(/<RUNNER_VERSION>/g, runnerVersion) | ||
|
@@ -187,6 +208,7 @@ jobs: | |
releaseNote = releaseNote.replace(/<LINUX_X64_SHA>/g, '${{needs.build.outputs.linux-x64-sha}}') | ||
releaseNote = releaseNote.replace(/<LINUX_ARM_SHA>/g, '${{needs.build.outputs.linux-arm-sha}}') | ||
releaseNote = releaseNote.replace(/<LINUX_ARM64_SHA>/g, '${{needs.build.outputs.linux-arm64-sha}}') | ||
releaseNote = releaseNote.replace(/<LINUX_S390X_SHA>/g, '${{needs.build.outputs.linux-s390x-sha}}') | ||
console.log(releaseNote) | ||
core.setOutput('version', runnerVersion); | ||
core.setOutput('note', releaseNote); | ||
|
@@ -201,6 +223,7 @@ jobs: | |
echo "${{needs.build.outputs.linux-x64-sha}} actions-runner-linux-x64-${{ steps.releaseNote.outputs.version }}.tar.gz" | shasum -a 256 -c | ||
echo "${{needs.build.outputs.linux-arm-sha}} actions-runner-linux-arm-${{ steps.releaseNote.outputs.version }}.tar.gz" | shasum -a 256 -c | ||
echo "${{needs.build.outputs.linux-arm64-sha}} actions-runner-linux-arm64-${{ steps.releaseNote.outputs.version }}.tar.gz" | shasum -a 256 -c | ||
echo "${{needs.build.outputs.linux-s390x-sha}} actions-runner-linux-s390x-${{ steps.releaseNote.outputs.version }}.tar.gz" | shasum -a 256 -c | ||
# Create GitHub release | ||
- uses: actions/create-release@master | ||
|
@@ -285,6 +308,16 @@ jobs: | |
asset_name: actions-runner-linux-arm64-${{ steps.releaseNote.outputs.version }}.tar.gz | ||
asset_content_type: application/octet-stream | ||
|
||
- name: Upload Release Asset (linux-s390x) | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.createRelease.outputs.upload_url }} | ||
asset_path: ${{ github.workspace }}/actions-runner-linux-s390x-${{ steps.releaseNote.outputs.version }}.tar.gz | ||
asset_name: actions-runner-linux-s390x-${{ steps.releaseNote.outputs.version }}.tar.gz | ||
asset_content_type: application/octet-stream | ||
|
||
publish-image: | ||
needs: release | ||
runs-on: ubuntu-latest | ||
|
@@ -296,28 +329,28 @@ jobs: | |
IMAGE_NAME: ${{ github.repository_owner }}/actions-runner | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
uses: actions/checkout@v4 | ||
- name: Compute image version | ||
id: image | ||
uses: actions/github-script@v6 | ||
uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
const fs = require('fs'); | ||
const runnerVersion = fs.readFileSync('${{ github.workspace }}/releaseVersion', '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 | ||
|
@@ -335,4 +368,4 @@ jobs: | |
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 | ||
org.opencontainers.image.licenses=MIT |
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
Oops, something went wrong.