Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
fangzhengjin committed Sep 20, 2023
1 parent 3f0b6b7 commit 6d3b03a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/run-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports = async (scripts) => {
const { github, context, core, glob, io, exec, fetch, require } = scripts;

const package = RegExp(`^packages/(?<p>[\\w-]+)$`, 'gm').exec(context.payload.label.name).groups['p'];
const version = RegExp(`^${package}-v?(?<v>.*)$`, 'gm').exec(context.payload.pull_request.head.ref).groups['v'];
const version = RegExp(`^${package}/v?(?<v>.*)$`, 'gm').exec(context.payload.pull_request.head.ref).groups['v'];
const runtime = require('.github/scripts/runtime.js')(scripts);
const namespaces = ['docker.io/fangzhengjin', 'ghcr.io/containers-actions'];
const tags = [];
Expand Down
4 changes: 2 additions & 2 deletions .github/scripts/runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ module.exports = (scripts) => {
const newRef = await github.rest.git.createRef({
...context.repo,
ref: `refs/heads/${newBranch}`,
sha: originRef.data.object.sha,
sha: originRef.object.sha,
});
return true;
}
Expand Down Expand Up @@ -224,7 +224,7 @@ module.exports = (scripts) => {
},
uploadFileAndCreatePullRequest: async (package, latestVersion, uploadPath, content) => {
const newLatestVersion = semver.clean(latestVersion, { loose: true });
const newBranch = `${package}-${newLatestVersion}`;
const newBranch = `${package}/${newLatestVersion}`;
await actions.autoPullRequest(newBranch, package, newLatestVersion, async () => {
return await actions.updateFile(
newBranch,
Expand Down

0 comments on commit 6d3b03a

Please sign in to comment.