Skip to content

Commit

Permalink
Merge pull request #141 from github-copilot-resources/fix/fixed-footer
Browse files Browse the repository at this point in the history
Fix for the footer and release action
  • Loading branch information
karpikpl authored Jan 22, 2025
2 parents d654e60 + b3d20a4 commit 5076a1f
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 14 deletions.
40 changes: 33 additions & 7 deletions .github/workflows/deploy_to_ghcr_tag_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
permissions:
packages: write
contents: write
pull-requests: write

jobs:
version_update:
Expand All @@ -23,27 +24,50 @@ jobs:
fetch-depth: 0

- uses: actions4git/setup-git@v1

- name: Update version in package.json
id: version
run: |
git checkout -b temp-version-update
git checkout main
version=$(npm version from-git --no-git-tag-version)
echo "version=$version" >> $GITHUB_OUTPUT
echo "NPM version is $version"
if [ "${{ github.event.release.tag_name }}" != "$version" ]; then
echo "Release tag does not match the expected version."
exit 1
fi
cd api
npm version from-git --no-git-tag-version
git add package.json
git commit --signoff --message $version
git checkout main
git merge temp-version-update
cd ..
git add .
git commit --signoff --message $version
echo "moving tag $version"
git tag --force $version
git push origin main -f --tags
git push origin $version --force
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
title: '🚀Update version to ${{ steps.version.outputs.version }}'
body: |
This PR updates the version to ${{ steps.version.outputs.version }}.
Use **merge commit** strategy for this PR!
branch: 'version-update-${{ steps.version.outputs.version }}'
delete-branch: true
labels: 'version-update'
base: 'main'

push_to_ghcr:
runs-on: ubuntu-latest
needs: version_update
steps:
- name: Checkout GitHub Action
uses: actions/checkout@v4
with:
ref: ${{ github.event.release.tag_name }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
Expand Down Expand Up @@ -82,6 +106,8 @@ jobs:
steps:
- name: Checkout GitHub Action
uses: actions/checkout@v4
with:
ref: ${{ github.event.release.tag_name }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
Expand Down
4 changes: 2 additions & 2 deletions api/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gh-api",
"version": "1.0.0",
"version": "1.9.0",
"main": "server.js",
"scripts": {
"start": "node server.mjs",
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "copilot-metrics-viewer",
"version": "1.8.0",
"version": "1.9.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
Expand Down
9 changes: 8 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<v-main>
<MainComponent />
</v-main>
<v-footer class="bg-indigo-lighten-1 text-center d-flex flex-column">
<v-footer class="bg-indigo-lighten-1 text-center d-flex flex-column fixed-footer">
<div class="px-4 py-2 text-center w-100">
{{ new Date().getFullYear() }} — <strong>Copilot Metrics Viewer</strong> — {{ version }}
</div>
Expand All @@ -29,3 +29,10 @@ export default defineComponent({
},
})
</script>

<style scoped>
.fixed-footer {
height: 50px;
max-height: 50px;
}
</style>

0 comments on commit 5076a1f

Please sign in to comment.