build: update the go modules to the latest
Run make go.mod.update to update the go modules to
the latest references.
Signed-off-by: travisn <tnielsen@redhat.com>
(cherry picked from commit 138624a3b0)
This commit is contained in:
3 files changed
+28
-94
No files matched your search
@@ -1,67 +0,0 @@
|
||||
# This workflow is based on https://github.com/dependabot/dependabot-actions-workflow
|
||||
|
||||
name: Update Dependabot Bundler PR
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["Build Dependabot Bundler PR"]
|
||||
types:
|
||||
- completed
|
||||
|
||||
jobs:
|
||||
update:
|
||||
runs-on: ubuntu-20.04
|
||||
if: >
|
||||
${{ github.event.workflow_run.event == 'push' &&
|
||||
github.event.workflow_run.conclusion == 'success' }}
|
||||
steps:
|
||||
- name: Download pr changes
|
||||
uses: actions/github-script@v6.4.1
|
||||
with:
|
||||
script: |
|
||||
var artifacts = await github.actions.listWorkflowRunArtifacts({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
run_id: ${{github.event.workflow_run.id }},
|
||||
});
|
||||
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
|
||||
return artifact.name == "dependabot-pr"
|
||||
})[0];
|
||||
var download = await github.actions.downloadArtifact({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
artifact_id: matchArtifact.id,
|
||||
archive_format: 'zip',
|
||||
});
|
||||
var fs = require('fs');
|
||||
fs.writeFileSync('/home/runner/work/dependabot-pr.zip', Buffer.from(download.data));
|
||||
- run: mkdir -p /home/runner/work/dependabot-pr
|
||||
# NOTE: actions/checkout will delete the contents of the current workspace
|
||||
# so we unpack the changes outside the current workspace
|
||||
- name: Unpack dependabot pr changes
|
||||
run: unzip -o /home/runner/work/dependabot-pr.zip -d /home/runner/work/dependabot-pr
|
||||
- name: Set BRANCH_REF env var
|
||||
run: printf "BRANCH_REF=%q" "$(head -1 '/home/runner/work/dependabot-pr/BRANCH_REF')" >> $GITHUB_ENV
|
||||
- name: Checkout the branch that triggered 'Build Dependabot Bundler PR'
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ env.BRANCH_REF }}
|
||||
- name: Configure git
|
||||
run: |
|
||||
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git config --local user.name "github-actions[bot]"
|
||||
- name: Commit changes
|
||||
run: |
|
||||
CHANGES_PATH=/home/runner/work/dependabot-pr/changes.patch
|
||||
if [ -f "$CHANGES_PATH" ]; then
|
||||
git am --keep-non-patch $CHANGES_PATH
|
||||
else
|
||||
echo "No changes where committed"
|
||||
fi
|
||||
- name: Push changes back to dependabot/bundler branch
|
||||
run: |
|
||||
if [[ "$BRANCH_REF" =~ ^dependabot/bundler* ]]; then
|
||||
git push origin $BRANCH_REF
|
||||
else
|
||||
echo "Branch ref doesn't look like a dependabot/bundler branch: $BRANCH_REF"
|
||||
exit 1
|
||||
fi
|
||||
Reference in new issue
Block a user