Skip to content

Commit 5076a1f

Browse files
authored
Merge pull request #141 from github-copilot-resources/fix/fixed-footer
Fix for the footer and release action
2 parents d654e60 + b3d20a4 commit 5076a1f

File tree

6 files changed

+47
-14
lines changed

6 files changed

+47
-14
lines changed

.github/workflows/deploy_to_ghcr_tag_release.yaml

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212
permissions:
1313
packages: write
1414
contents: write
15+
pull-requests: write
1516

1617
jobs:
1718
version_update:
@@ -23,27 +24,50 @@ jobs:
2324
fetch-depth: 0
2425

2526
- uses: actions4git/setup-git@v1
26-
27+
2728
- name: Update version in package.json
2829
id: version
2930
run: |
30-
git checkout -b temp-version-update
31+
git checkout main
3132
version=$(npm version from-git --no-git-tag-version)
33+
echo "version=$version" >> $GITHUB_OUTPUT
34+
echo "NPM version is $version"
35+
36+
if [ "${{ github.event.release.tag_name }}" != "$version" ]; then
37+
echo "Release tag does not match the expected version."
38+
exit 1
39+
fi
40+
3241
cd api
3342
npm version from-git --no-git-tag-version
34-
git add package.json
35-
git commit --signoff --message $version
36-
git checkout main
37-
git merge temp-version-update
43+
cd ..
44+
git add .
45+
git commit --signoff --message $version
46+
47+
echo "moving tag $version"
3848
git tag --force $version
39-
git push origin main -f --tags
49+
git push origin $version --force
50+
51+
- name: Create Pull Request
52+
uses: peter-evans/create-pull-request@v7
53+
with:
54+
title: '🚀Update version to ${{ steps.version.outputs.version }}'
55+
body: |
56+
This PR updates the version to ${{ steps.version.outputs.version }}.
57+
Use **merge commit** strategy for this PR!
58+
branch: 'version-update-${{ steps.version.outputs.version }}'
59+
delete-branch: true
60+
labels: 'version-update'
61+
base: 'main'
4062

4163
push_to_ghcr:
4264
runs-on: ubuntu-latest
4365
needs: version_update
4466
steps:
4567
- name: Checkout GitHub Action
4668
uses: actions/checkout@v4
69+
with:
70+
ref: ${{ github.event.release.tag_name }}
4771

4872
- name: Login to GitHub Container Registry
4973
uses: docker/login-action@v3
@@ -82,6 +106,8 @@ jobs:
82106
steps:
83107
- name: Checkout GitHub Action
84108
uses: actions/checkout@v4
109+
with:
110+
ref: ${{ github.event.release.tag_name }}
85111

86112
- name: Login to GitHub Container Registry
87113
uses: docker/login-action@v3

api/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gh-api",
3-
"version": "1.0.0",
3+
"version": "1.9.0",
44
"main": "server.js",
55
"scripts": {
66
"start": "node server.mjs",

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "copilot-metrics-viewer",
3-
"version": "1.8.0",
3+
"version": "1.9.0",
44
"private": true,
55
"scripts": {
66
"serve": "vue-cli-service serve",

src/App.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<v-main>
44
<MainComponent />
55
</v-main>
6-
<v-footer class="bg-indigo-lighten-1 text-center d-flex flex-column">
6+
<v-footer class="bg-indigo-lighten-1 text-center d-flex flex-column fixed-footer">
77
<div class="px-4 py-2 text-center w-100">
88
{{ new Date().getFullYear() }} — <strong>Copilot Metrics Viewer</strong> — {{ version }}
99
</div>
@@ -29,3 +29,10 @@ export default defineComponent({
2929
},
3030
})
3131
</script>
32+
33+
<style scoped>
34+
.fixed-footer {
35+
height: 50px;
36+
max-height: 50px;
37+
}
38+
</style>

0 commit comments

Comments
 (0)