mirror of
https://github.com/gmeligio/flutter-docker-image.git
synced 2026-05-24 12:30:34 +00:00
24 lines
675 B
JavaScript
24 lines
675 B
JavaScript
module.exports = async ({ core, context, github }) => {
|
|
const { OLD_FLUTTER_VERSION, NEW_FLUTTER_VERSION } = process.env
|
|
|
|
if (!OLD_FLUTTER_VERSION) {
|
|
core.setFailed('Environment variable OLD_FLUTTER_VERSION is required.')
|
|
}
|
|
|
|
if (!NEW_FLUTTER_VERSION) {
|
|
core.setFailed('Environment variable NEW_FLUTTER_VERSION is required.')
|
|
}
|
|
|
|
if (OLD_FLUTTER_VERSION === NEW_FLUTTER_VERSION) {
|
|
return
|
|
}
|
|
|
|
// Create a git tag using the GitHub API instead of the git client to skip SSH/GPG key setup.
|
|
github.rest.git.createRef({
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
ref: `refs/tags/${NEW_FLUTTER_VERSION}`,
|
|
sha: context.sha,
|
|
})
|
|
}
|