Skip to content

Commit

Permalink
merge workflows for tags ref
Browse files Browse the repository at this point in the history
  • Loading branch information
gMonty030 committed Dec 18, 2024
1 parent 34f8d64 commit 3488b33
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 52 deletions.
39 changes: 34 additions & 5 deletions .github/workflows/build_image_release.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
name: Build image release on GHCR

on:
workflow_run:
workflows:
- Create Github Release
types:
- completed
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -16,6 +14,37 @@ env:
IMAGE_NAME: ${{ github.repository_owner }}/geth

jobs:
release:
name: Github Release
runs-on: ubuntu-latest

steps:
- name: Create Github Release
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
if (!${{ toJson(github.ref_name) }}) {
core.setFailed("RELEASE_TAG is not defined.")
return;
}
try {
const response = await github.rest.repos.createRelease({
name: ${{ toJson(github.ref_name) }},
tag_name: ${{ toJson(github.ref_name) }},
draft: false,
generate_release_notes: true,
owner: context.repo.owner,
prerelease: false,
repo: context.repo.repo,
});
core.exportVariable('RELEASE_ID', response.data.id);
core.exportVariable('RELEASE_UPLOAD_URL', response.data.upload_url);
} catch (error) {
core.setFailed(error.message);
}
build-and-push-image:
runs-on: ubuntu-latest
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
Expand Down
47 changes: 0 additions & 47 deletions .github/workflows/tag_release.yml

This file was deleted.

0 comments on commit 3488b33

Please sign in to comment.