Skip to content

Commit

Permalink
Merge branch 'main' into update-actions-runner-to-2.297.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-harvey authored Sep 29, 2022
2 parents 4e3558e + f3605dd commit d70f931
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4.1.0
- uses: actions/setup-python@v4.2.0
- uses: pre-commit/[email protected]
19 changes: 6 additions & 13 deletions .github/workflows/update-actions-runner.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: Get latest GitHub Actions Runner

on:
push:
branches: [bharvey-github-actor]
# schedule:
# - cron: "40 18 * * *"
schedule:
- cron: "40 18 * * *"

jobs:
update-runner:
runs-on: ubuntu-latest
Expand All @@ -13,11 +12,13 @@ jobs:
uses: actions/checkout@v3
with:
token: ${{ secrets.ROBOT_MAC_FC_TOKEN }}

- name: Set release version and current version variables
id: get-versions
run: |
echo ::set-output name=current_tag::$(grep ACTIONS_VERSION Dockerfile | cut -d'=' -f 2 | sed -e 's/^"//' -e 's/"$//')
echo ::set-output name=release_tag::$(curl -sL https://api.github.com/repos/actions/runner/releases/latest | jq -r ".tag_name[1:] | tostring")
- name: Change release version in Dockerfile
if: ${{ steps.get-versions.outputs.release_tag != steps.get-versions.outputs.current_tag }}
id: update-version
Expand All @@ -26,15 +27,7 @@ jobs:
NEW_VERSION: ${{ steps.get-versions.outputs.release_tag }}
run: |
sed -i --expression='s,"'"$OLD_VERSION"'","'"$NEW_VERSION"'",g' Dockerfile
# - name: set up Git
# if: ${{ steps.get-versions.outputs.release_tag != steps.get-versions.outputs.current_tag }}
# env:
# GITHUB_TOKEN: ${{ secrets.ROBOT_MAC_FC_TOKEN }}
# GITHUB_ACTOR_NAME: "@robot-mac-fc"
# GITHUB_ACTOR_EMAIL: "[email protected]"
# run: |
# git config --global user.name $GITHUB_ACTOR_NAME
# git config --global user.email $GITHUB_ACTOR_EMAIL
- name: Create Pull Request
if: ${{ steps.get-versions.outputs.release_tag != steps.get-versions.outputs.current_tag }}
uses: peter-evans/create-pull-request@v4
Expand Down

0 comments on commit d70f931

Please sign in to comment.