Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update from upstream #49

Closed
wants to merge 11 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/sync-upstream-changes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Sync with Upstream (change)

on:
pull_request_review:
types: [submitted]

jobs:
sync:
runs-on: ubuntu-latest
if: github.event.review.state != 'approved' && github.event.pull_request.user.login == 'gha-runner-images-updater-test[bot]'
steps:
- name: Generate GitHub App token
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.GH_APP_ID }}
private-key: ${{ secrets.GH_APP_KEY }}

- name: Checkout the repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ steps.generate-token.outputs.token }}
ref: ${{ github.event.pull_request.head.ref }}

- name: Reset branch to main
run: |
git reset --hard origin/main

- name: Configure Git
run: |
git config user.name 'gha-runner-images-updater-test[bot]'
git config user.email '172421971+gha-runner-images-updater-test[bot]@[email protected]'

- name: Pull changes from upstream and rebase
id: rebase
run: |
git remote add upstream https://github.com/actions/runner-images.git
git fetch upstream
git rebase upstream/main || echo "conflict=true" >> $GITHUB_OUTPUT

- name: Push changes to branch
run: |
git push -f origin ${{ github.event.pull_request.head.ref }}
122 changes: 122 additions & 0 deletions .github/workflows/sync-upstream-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
name: Sync with Upstream (create)

on:
schedule:
- cron: "0 0 1 * *" # Runs at 00:00 on the first day of every month
workflow_dispatch:
# TODO: Remove this trigger once the workflow is ready
pull_request:
branches:
- main

jobs:
sync:
runs-on: ubuntu-latest
if: github.event.pull_request.user.login != 'gha-runner-images-updater-test[bot]'
steps:
- name: Generate GitHub App token
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.GH_APP_ID }}
private-key: ${{ secrets.GH_APP_KEY }}

- name: Checkout the repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ steps.generate-token.outputs.token }}
ref: main

- name: Create new branch from main
run: |
git checkout -b update-from-upstream-${{ github.run_number }}

- name: Configure Git
run: |
git config user.name 'gha-runner-images-updater-test[bot]'
git config user.email '172421971+gha-runner-images-updater-test[bot]@[email protected]'

#TODO: Remove this step once the workflow is ready
- name: Merge the feature branch for the workflow
run: |
git merge --squash origin/gc/sync-upstream
git commit -m "Add sync-upstream.yml workflow (#7)"

- name: Pull changes from upstream and rebase
id: rebase
run: |
git remote add upstream https://github.com/actions/runner-images.git
git fetch upstream
git rebase upstream/main || echo "conflicts=true" >> $GITHUB_OUTPUT

- name: Handle conflicts with empty commit
if: steps.rebase.outputs.conflicts == 'true'
run: |
git rebase --abort
git commit --allow-empty -m "Empty commit due to rebase conflicts"

- name: Push changes to new branch
run: |
git push -f origin update-from-upstream-${{ github.run_number }}

- name: Set PR body
id: pr-body
run: |
PR_BODY_CONFLICTS='# :warning: PR WITH REBASE CHANGES. DO NOT MERGE MANUALLY.

This is an automated PR to rebase updates from upstream. Please review the changes and approve. The bot will be responsible for pushing the changes to main and closing the PR.

This pull request was created by the [Sync from Upstream (create)](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) workflow.

To see the changes in this PR use `git range-diff origin/main...origin/update-from-upstream-${{ github.run_number }}`.

This PR contains an empty commit due to conflicts during rebase. To rebase the changes manually, use the following commands:
```
# Checkout the branch
git checkout update-from-upstream-${{ github.run_number }}
# Reset the branch to main
git reset --hard origin/main
# Pull changes from upstream
git remote add upstream https://github.com/actions/runner-images.git
git fetch upstream
# Rebase the changes
git rebase upstream/main

# Solve the conflcits and continue the rebase
git rebase --continue

# Push the changes to the branch
git push -f origin update-from-upstream-${{ github.run_number }}
```

### :x: CONFLICTS DURING REBASE. PLEASE HANDLE THE CONFLICTS APPROPRIATELY.'
PR_BODY_NO_CONFLICTS='# :warning: PR WITH REBASE CHANGES. DO NOT MERGE MANUALLY.

This is an automated PR to rebase updates from upstream. Please review the changes and approve. The bot will be responsible for pushing the changes to main and closing the PR.

This pull request was created by the [Sync from Upstream (create)](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) workflow.

To see the changes in this PR use `git range-diff origin/main...origin/update-from-upstream-${{ github.run_number }}`.

### :white_check_mark: NO CONFLICTS DURING REBASE.'
echo 'body<<EOF' >> $GITHUB_OUTPUT
if [ "$conflicts" == "true" ]; then
echo "$PR_BODY_CONFLICTS" >> $GITHUB_OUTPUT
else
echo "$PR_BODY_NO_CONFLICTS" >> $GITHUB_OUTPUT
fi
echo EOF >> $GITHUB_OUTPUT

- name: Create pull request
env:
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
run: |
gh pr create --title "Update from upstream" \
--body "${{ steps.pr-body.outputs.body }}" \
--base main --head update-from-upstream-${{ github.run_number }} \
--repo ${{ github.repository }} \
|| \
gh pr edit update-from-upstream-${{ github.run_number }} \
--repo ${{ github.repository }} \
--body "${{ steps.pr-body.outputs.body }}"
53 changes: 53 additions & 0 deletions .github/workflows/sync-upstream-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Sync with Upstream (push)

on:
pull_request_review:
types: [submitted]

jobs:
sync:
runs-on: ubuntu-latest
if: github.event.review.state == 'approved' && github.event.pull_request.user.login == 'gha-runner-images-updater-test[bot]'
steps:
- name: Generate GitHub App token
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.GH_APP_ID }}
private-key: ${{ secrets.GH_APP_KEY }}

- name: Checkout the repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ steps.generate-token.outputs.token }}

- name: Configure Git
run: |
git config user.name 'gha-runner-images-updater-test[bot]'
git config user.email '172421971+gha-runner-images-updater-test[bot]@[email protected]'

- name: Check if changes will be removed from main
id: check-changes
run: |
git fetch origin
changest_removed=$(git range-diff origin/main...origin/${{ github.event.pull_request.head.ref }} | grep -q '<')
if [ -n "$changes_removed" ]; then
echo "Commits will be removed from main, this shouldn't happen. Please request changes on the pull request."
exit 1
else
echo "Commits will not be removed from main."
exit 0
fi

- name: Push changes to main
run: |
git push -f origin main

- name: Close pull request
env:
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
run: |
gh pr close ${{ github.event.pull_request.number }}\
--repo ${{ github.repository }}\
--comment "This PR was automatically closed by the bot after pushing the changes to main."
20 changes: 10 additions & 10 deletions images/macos/macos-13-arm64-Readme.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# macOS 13
- OS Version: macOS 13.6.7 (22G720)
- Kernel Version: Darwin 22.6.0
- Image Version: 20240603.1
- Image Version: 20240609.1

## Installed Software

Expand Down Expand Up @@ -62,14 +62,14 @@
- zstd 1.5.6

### Tools
- AWS CLI 2.16.0
- AWS CLI 2.16.4
- AWS SAM CLI 1.118.0
- AWS Session Manager CLI 1.2.633.0
- Azure CLI 2.61.0
- Azure CLI (azure-devops) 1.0.1
- Bicep CLI 0.27.1
- Cmake 3.29.3
- CodeQL Action Bundle 2.17.3
- Bicep CLI 0.28.1
- Cmake 3.29.5
- CodeQL Action Bundle 2.17.4
- Fastlane 2.220.0
- SwiftFormat 0.53.10
- Xcbeautify 2.3.1
Expand Down Expand Up @@ -115,8 +115,8 @@

#### Go
- 1.20.14
- 1.21.10
- 1.22.3
- 1.21.11
- 1.22.4

### Rust Tools
- Cargo 1.78.0
Expand All @@ -133,7 +133,7 @@

#### PowerShell Modules
- Az: 12.0.0
- Pester: 5.5.0
- Pester: 5.6.0
- PSScriptAnalyzer: 1.22.0

### Xcode
Expand Down Expand Up @@ -180,8 +180,8 @@
| Simulator - watchOS 9.4 | watchsimulator9.4 | 14.3.1 |
| Simulator - watchOS 10.0 | watchsimulator10.0 | 15.0.1 |
| Simulator - watchOS 10.2 | watchsimulator10.2 | 15.1, 15.2 |
| Simulator - visionOS 1.0 | xrsimulator1.0 | 15.2 |
| visionOS 1.0 | xros1.0 | 15.2 |
| Simulator - visionOS 1.0 | xrsimulator1.0 | 15.2 |
| Asset Runtime SDK for macOS hosts targeting watchOS 9.4 | assetruntime.host.macosx.target.watchos9.4 | 14.3.1 |
| Asset Runtime SDK for macOS hosts targeting iOS 16.4 | assetruntime.host.macosx.target.iphoneos16.4 | 14.3.1 |
| Asset Runtime SDK for macOS hosts targeting tvOS 16.4 | assetruntime.host.macosx.target.appletvos16.4 | 14.3.1 |
Expand Down Expand Up @@ -215,7 +215,7 @@
| Android Command Line Tools | 11.0 |
| Android Emulator | 34.2.15 |
| Android SDK Build-tools | 34.0.0<br>33.0.2 33.0.3 |
| Android SDK Platforms | android-34-ext8 (rev 1)<br>android-34-ext11 (rev 1)<br>android-34 (rev 3)<br>android-33-ext5 (rev 1)<br>android-33-ext4 (rev 1)<br>android-33 (rev 3) |
| Android SDK Platforms | android-34-ext8 (rev 1)<br>android-34-ext12 (rev 1)<br>android-34 (rev 3)<br>android-33-ext5 (rev 1)<br>android-33-ext4 (rev 1)<br>android-33 (rev 3) |
| Android SDK Platform-Tools | 35.0.1 |
| Android Support Repository | 47.0.0 |
| CMake | 3.22.1 |
Expand Down
Loading