Skip to content

Commit

Permalink
Merge pull request #6 from tcorzo/develop
Browse files Browse the repository at this point in the history
👷 Add branch protection workflows and remove misconfigured cache from…
  • Loading branch information
tcorzo authored Nov 3, 2024
2 parents d551e89 + 2788904 commit 371bb4f
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 9 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CI

on:
push:
branches: [master, develop]
branches: [develop]
pull_request:
branches: [master, develop]

Expand All @@ -17,7 +17,6 @@ jobs:
uses: denoland/setup-deno@v2
with:
deno-version: v2.x
cache: "deno"

- name: Install dependencies
run: deno install
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/generic-branch-protection.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Branch Protection

on:
pull_request:
branches-ignore: [master]

jobs:
check-branch:
runs-on: ubuntu-latest
steps:
- name: Check branch
run: |
if [[ ${GITHUB_BASE_REF} != develop ]]
then
echo "Error: Pull request must be to 'develop' branch"
exit 1
fi
if [[ ${GITHUB_HEAD_REF} == master || ${GITHUB_HEAD_REF} == develop ]]
then
echo "Error: Pull request must not come from 'master' or 'develop' branch"
exit 1
fi
8 changes: 4 additions & 4 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: GitHub Pages
on:
push:
branches:
- 'master'
- "master"
workflow_dispatch:

permissions:
Expand All @@ -12,7 +12,7 @@ permissions:
id-token: write

concurrency:
group: 'pages'
group: "pages"
cancel-in-progress: true

jobs:
Expand All @@ -29,7 +29,7 @@ jobs:
uses: denoland/setup-deno@v2
with:
deno-version: v2.x
cache: 'deno'
cache: "deno"

- name: Install dependencies
run: deno install
Expand All @@ -43,7 +43,7 @@ jobs:
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './dist'
path: "./dist"

- name: Deploy to GitHub Pages
id: deployment
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/master-branch-protection.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Branch Protection

on:
pull_request:
branches:
- master

jobs:
check-branch:
runs-on: ubuntu-latest
steps:
- name: Check branch
run: |
if [[ ${GITHUB_HEAD_REF} != develop ]]
then
echo "Error: Pull request must come from 'develop' branch"
exit 1
fi
2 changes: 1 addition & 1 deletion public/vite.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/assets/vue.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/components/UploadProgramButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const handleFileUpload = (event: Event) => {
<div class="file-upload">
<input type="file" ref="fileInput" accept=".csv" style="display: none" @change="handleFileUpload">
<button @click="triggerFileInput" class="upload-button">
Cargar programa 📁
Cargar program 📁
</button>
</div>
</template>

0 comments on commit 371bb4f

Please sign in to comment.