-
Notifications
You must be signed in to change notification settings - Fork 8
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 #67 from earthly/ido-auto-update-dist-for-renovate
Auto update dist for renovate
- Loading branch information
Showing
3 changed files
with
55 additions
and
0 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,28 @@ | ||
name: Update Renovate Branch | ||
|
||
on: | ||
pull_request: | ||
branches: [ main ] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
update-renovate-branch: | ||
if: github.event.pull_request.head.repo.full_name == github.repository && startsWith(github.head_ref, 'renovate/') && github.head_ref == 'renovate[bot]' | ||
runs-on: ubuntu-latest | ||
env: | ||
FORCE_COLOR: 1 | ||
EARTHLY_CONVERSION_PARALLELISM: "5" | ||
EARTHLY_TOKEN: "${{ secrets.EARTHLY_TOKEN }}" | ||
EARTHLY_INSTALL_ID: "earthly-actions-setup-githubactions" | ||
steps: | ||
- uses: earthly/actions/setup-earthly@v1 | ||
with: | ||
version: v0.8.6 | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
- name: Update Branch | ||
run: earthly --ci -P --push +update-dist |
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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
VERSION 0.8 | ||
|
||
PROJECT earthly-technologies/core | ||
|
||
npm-base: | ||
FROM node:21.7-alpine3.19 | ||
COPY ./package.json ./ | ||
|
@@ -93,6 +95,27 @@ lint-newline: | |
done; \ | ||
exit $code | ||
|
||
update-dist-for-renovate: | ||
FROM alpine/git | ||
RUN git config --global user.name "renovate[bot]" && \ | ||
git config --global user.email "renovate[bot]@users.noreply.github.com" && \ | ||
git config --global url."[email protected]:".insteadOf "https://github.com/" | ||
|
||
ARG git_repo="earthly/actions-setup" | ||
ARG git_url="[email protected]:$git_repo" | ||
ARG earthly_lib_version=3.0.1 | ||
ARG SECRET_PATH=littleredcorvette-id_rsa | ||
DO --pass-args github.com/earthly/lib/utils/git:$earthly_lib_version+DEEP_CLONE \ | ||
--GIT_URL=$git_url --SECRET_PATH=$SECRET_PATH | ||
|
||
ARG EARTHLY_GIT_BRANCH | ||
LET branch=$EARTHLY_GIT_BRANCH | ||
RUN --mount=type=secret,id=$SECRET_PATH,mode=0400,target=/root/.ssh/id_rsa \ | ||
git checkout $branch | ||
COPY --dir +compile/dist . | ||
RUN git add dist && git commit -m "update dist for Renovate" || echo nothing to commit | ||
RUN --push --mount=type=secret,id=$SECRET_PATH,mode=0400,target=/root/.ssh/id_rsa \ | ||
git push origin $branch | ||
|
||
all: | ||
BUILD +lint | ||
|