Skip to content

Commit

Permalink
Runner image buildx and Website Precommit update (#27427)
Browse files Browse the repository at this point in the history
* add buildx and fix gcloud

* precommit website update and enable
  • Loading branch information
volatilemolotov authored Jul 10, 2023
1 parent e8e604d commit 738c02c
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 22 deletions.
8 changes: 6 additions & 2 deletions .github/gh-actions-self-hosted-runners/arc/images/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@
# under the License.
#


FROM ghcr.io/actions-runner-controller/actions-runner-controller/actions-runner:ubuntu-20.04
#install BuildX
COPY --from=docker/buildx-bin:0.11.1 /buildx /usr/libexec/docker/cli-plugins/docker-buildx
RUN docker buildx install && docker buildx version


USER root
#Install Node
Expand Down Expand Up @@ -56,7 +59,8 @@ RUN curl -OL https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-c
rm google-cloud-sdk-367.0.0-linux-x86_64.tar.gz && \
mv google-cloud-sdk /usr/local/google-cloud-sdk && \
/usr/local/google-cloud-sdk/install.sh --quiet && \
/usr/local/google-cloud-sdk/bin/gcloud components install kubectl
/usr/local/google-cloud-sdk/bin/gcloud components install kubectl && \
chown -R runner:runner /home/runner/.config/gcloud
ENV PATH="${PATH}:/usr/local/google-cloud-sdk/bin"

# Needed to transfer path addtitions to runner environment
Expand Down
79 changes: 59 additions & 20 deletions .github/workflows/beam_PreCommit_Website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,66 @@
# See the License for the specific language governing permissions and
# limitations under the License.

name: beam_PreCommit_Website
name: Website PreCommit

on:
workflow_dispatch:
push:
tags: ['v*']
branches: ['master', 'release-*']
paths: ['website/**']
pull_request_target:
branches: ['master', 'release-*']
paths: ['website/**','.github/workflows/beam_PreCommit_Website.yml']
issue_comment:
types: [created]
schedule:
- cron: '* */6 * * *'
#Setting explicit permissions for the action to avoid the default permissions which are `write-all` in case of pull_request_target event
permissions:
actions: write
pull-requests: read
checks: read
contents: read
deployments: read
id-token: none
issues: read
discussions: read
packages: read
pages: read
repository-projects: read
security-events: read
statuses: read

jobs:
beam_PreCommit_Website:
if: ${{github.event.issue.pull_request}} || ${{github.event.comment.body == 'Run Website PreCommit'}} || ${{github.event.schedule}}
runs-on: [self-hosted, ubuntu-20.04]
name: beam_PreCommit_Website
steps:
- name: Git checkout
uses: actions/checkout@v3
- name: Install Java
uses: actions/setup-java@v3.8.0
with:
distribution: 'zulu'
java-version: '8'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
cache-read-only: false
- name: run websitePreCommit script
run: ./gradlew :websitePreCommit
beam_PreCommit_Website:
if: |
github.event_name == 'push' ||
github.event_name == 'pull_request_target' ||
github.event.comment.body == 'Run Website PreCommit' ||
github.event_name == 'schedule'
runs-on: [self-hosted, ubuntu-20.04, small]
name: beam_PreCommit_Website
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Rerun on comment
if: github.event.comment.body == 'Run Python_Coverage PreCommit'
uses: ./.github/actions/rerun-job-action
with:
pull_request_url: ${{ github.event.issue.pull_request.url }}
github_repository: ${{ github.repository }}
github_token: ${{ secrets.GITHUB_TOKEN }}
github_job: ${{ github.job }}
github_current_run_id: ${{ github.run_id }}
- name: Install Java
uses: actions/setup-java@v3.8.0
with:
distribution: 'zulu'
java-version: '8'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
cache-read-only: false
- name: run websitePreCommit script
run: ./gradlew :websitePreCommit

0 comments on commit 738c02c

Please sign in to comment.