This repository has been archived by the owner on Oct 13, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 4
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 #36 from LizardByte/nightly
v0.0.6
- Loading branch information
Showing
19 changed files
with
187 additions
and
81 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ on: | |
|
||
jobs: | ||
create_pr: | ||
if: startsWith(github.repository, 'LizardByte/') | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
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 |
---|---|---|
|
@@ -13,13 +13,14 @@ on: | |
|
||
jobs: | ||
autoapprove: | ||
if: > | ||
if: >- | ||
contains(fromJson('["LizardByte-bot"]'), github.event.pull_request.user.login) && | ||
contains(fromJson('["LizardByte-bot"]'), github.actor) | ||
contains(fromJson('["LizardByte-bot"]'), github.actor) && | ||
startsWith(github.repository, 'LizardByte/') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Autoapproving | ||
uses: hmarr/auto-approve-action@v2 | ||
uses: hmarr/auto-approve-action@v3 | ||
with: | ||
github-token: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
|
@@ -36,6 +37,7 @@ jobs: | |
}) | ||
automerge: | ||
if: startsWith(github.repository, 'LizardByte/') | ||
needs: [autoapprove] | ||
runs-on: ubuntu-latest | ||
concurrency: | ||
|
@@ -44,12 +46,12 @@ jobs: | |
|
||
steps: | ||
- name: Automerging | ||
uses: pascalgn/[email protected].3 | ||
uses: pascalgn/[email protected].5 | ||
env: | ||
BASE_BRANCHES: nightly | ||
GITHUB_TOKEN: ${{ secrets.GH_BOT_TOKEN }} | ||
GITHUB_LOGIN: ${{ secrets.GH_BOT_NAME }} | ||
MERGE_LABELS: "" | ||
MERGE_LABELS: "!dependencies" | ||
MERGE_METHOD: "squash" | ||
MERGE_COMMIT_MESSAGE: "{pullRequest.title} (#{pullRequest.number})" | ||
MERGE_DELETE_BRANCH: true | ||
|
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,71 @@ | ||
--- | ||
# This action is centrally managed in https://github.com/<organization>/.github/ | ||
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in | ||
# the above-mentioned repo. | ||
|
||
name: Label PR autoupdate | ||
|
||
on: | ||
pull_request_target: | ||
types: | ||
- edited | ||
- opened | ||
- reopened | ||
- synchronize | ||
|
||
jobs: | ||
label_pr: | ||
if: >- | ||
startsWith(github.repository, 'LizardByte/') && | ||
contains(github.event.pull_request.body, fromJSON('"] I want maintainers to keep my branch updated"')) | ||
runs-on: ubuntu-latest | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
steps: | ||
- name: Check if member | ||
id: org_member | ||
run: | | ||
status="true" | ||
gh api \ | ||
-H "Accept: application/vnd.github+json" \ | ||
/orgs/${{ github.repository_owner }}/members/${{ github.actor }} || status="false" | ||
echo "result=${status}" >> $GITHUB_OUTPUT | ||
- name: Label autoupdate | ||
if: >- | ||
steps.org_member.outputs.result == 'true' && | ||
contains(github.event.pull_request.labels.*.name, 'autoupdate') == false && | ||
contains(github.event.pull_request.body, | ||
fromJSON('"\n- [x] I want maintainers to keep my branch updated"')) == true | ||
uses: actions/github-script@v6 | ||
with: | ||
github-token: ${{ secrets.GH_BOT_TOKEN }} | ||
script: | | ||
github.rest.issues.addLabels({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
labels: ['autoupdate'] | ||
}) | ||
- name: Unlabel autoupdate | ||
if: >- | ||
contains(github.event.pull_request.labels.*.name, 'autoupdate') && | ||
( | ||
(github.event.action == 'synchronize' && steps.org_member.outputs.result == 'false') || | ||
(contains(github.event.pull_request.body, | ||
fromJSON('"\n- [x] I want maintainers to keep my branch updated"')) == false | ||
) | ||
) | ||
uses: actions/github-script@v6 | ||
with: | ||
github-token: ${{ secrets.GH_BOT_TOKEN }} | ||
script: | | ||
github.rest.issues.removeLabel({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
name: ['autoupdate'] | ||
}) |
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 |
---|---|---|
|
@@ -3,8 +3,9 @@ | |
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in | ||
# the above-mentioned repo. | ||
|
||
# This workflow is designed to work with: | ||
# - automerge workflows | ||
# This workflow is designed to work with the following workflows: | ||
# - automerge | ||
# - autoupdate-labeler | ||
|
||
# It uses GitHub Action that auto-updates pull requests branches, when changes are pushed to their destination branch. | ||
# Auto-updating to the latest destination branch works only in the context of upstream repo and not forks. | ||
|
@@ -17,16 +18,28 @@ on: | |
- 'nightly' | ||
|
||
jobs: | ||
autoupdate-for-bot: | ||
autoupdate: | ||
name: Autoupdate autoapproved PR created in the upstream | ||
if: startsWith(github.repository, 'LizardByte/') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Update | ||
uses: docker://chinthakagodawita/autoupdate-action:v1 | ||
env: | ||
EXCLUDED_LABELS: "central_dependency,dependencies" | ||
GITHUB_TOKEN: '${{ secrets.GH_BOT_TOKEN }}' | ||
PR_FILTER: "labelled" | ||
PR_LABELS: "autoupdate" | ||
PR_READY_STATE: "ready_for_review" | ||
MERGE_CONFLICT_ACTION: "ignore" | ||
PR_READY_STATE: "all" | ||
MERGE_CONFLICT_ACTION: "fail" | ||
|
||
dependabot-rebase: | ||
name: Dependabot Rebase | ||
if: >- | ||
startsWith(github.repository, 'LizardByte/') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: rebase | ||
uses: "bbeesley/[email protected]" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_BOT_TOKEN }} |
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 |
---|---|---|
|
@@ -31,7 +31,7 @@ jobs: | |
FOUND=false | ||
fi | ||
echo "::set-output name=dockerfile::${FOUND}" | ||
echo "dockerfile=${FOUND}" >> $GITHUB_OUTPUT | ||
outputs: | ||
dockerfile: ${{ steps.check.outputs.dockerfile }} | ||
|
@@ -42,12 +42,23 @@ jobs: | |
if: ${{ needs.check_dockerfile.outputs.dockerfile == 'true' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Lint Dockerfile | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- uses: hadolint/[email protected] | ||
- name: Hadolint | ||
id: hadolint | ||
uses: hadolint/[email protected] | ||
with: | ||
dockerfile: ./Dockerfile | ||
ignore: DL3008,DL3013,DL3016,DL3018,DL3028,DL3059 | ||
output-file: ./hadolint.log | ||
verbose: true | ||
|
||
- name: Log | ||
if: failure() | ||
run: | | ||
echo "Hadolint outcome: ${{ steps.hadolint.outcome }}" >> $GITHUB_STEP_SUMMARY | ||
cat "./hadolint.log" >> $GITHUB_STEP_SUMMARY | ||
check_changelog: | ||
name: Check Changelog | ||
|
@@ -128,12 +139,12 @@ jobs: | |
# read the platforms from `.docker_platforms` | ||
PLATFORMS=$(<.docker_platforms) | ||
echo ::set-output name=branch::${BRANCH} | ||
echo ::set-output name=build_date::$(date -u +'%Y-%m-%dT%H:%M:%SZ') | ||
echo ::set-output name=commit::${COMMIT} | ||
echo ::set-output name=platforms::${PLATFORMS} | ||
echo ::set-output name=push::${PUSH} | ||
echo ::set-output name=tags::${TAGS} | ||
echo "branch=${BRANCH}" >> $GITHUB_OUTPUT | ||
echo "build_date=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT | ||
echo "commit=${COMMIT}" >> $GITHUB_OUTPUT | ||
echo "platforms=${PLATFORMS}" >> $GITHUB_OUTPUT | ||
echo "push=${PUSH}" >> $GITHUB_OUTPUT | ||
echo "tags=${TAGS}" >> $GITHUB_OUTPUT | ||
- name: Set Up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
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
Oops, something went wrong.