Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gha: update to latest actions #235

Merged
merged 5 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 20 additions & 35 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,25 @@
name: Publish Bundle

---
name: publish-release
on:
push:
tags:
- v*

tags: ['v*']
jobs:
build:
runs-on: ubuntu-latest

runs-on: ubuntu-22.04
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious why we set this to a specific version

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably for stability. But we should match whatever netlify uses. Do we know what they use?

Copy link
Member Author

@andrewhsu andrewhsu Dec 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

conservatively locking to ubuntu-22.04 to keep consistent behavior after ubuntu-latest is updated in coming change: actions/runner-images#10636

related to jira DEVPROD-2450

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Cache node_modules
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-

- name: Install Dependencies
run: npm install

- name: Run Gulp Bundle
run: gulp bundle

- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create "${{ github.ref_name }}" ./build/ui-bundle.zip \
--repo="$GITHUB_REPOSITORY" \
--title="${{ github.ref_name }}" \
--generate-notes

- name: Trigger Netlify Build Hook
run: curl -X POST -d {} https://api.netlify.com/build_hooks/64e4682992f9ec30865c7c0b
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm install
- run: gulp bundle
- run: |
gh release create \
"${{ github.ref_name }}" ./build/ui-bundle.zip --generate-notes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Trigger Netlify Build Hook
run: curl -X POST -d {} https://api.netlify.com/build_hooks/64e4682992f9ec30865c7c0b
28 changes: 12 additions & 16 deletions .github/workflows/validate-build.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
---
# This workflow makes sure that the UI builds without errors

name: Validate the build

name: validate-build
on:
pull_request:
branches: [ main ]

branches: [main]
jobs:
build:

runs-on: ubuntu-latest

runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 10
- name: Bundle UI
run: |
npm i
gulp bundle
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The publish release workflow doesn’t use this so I wonder if it’s even needed

with:
node-version: 10
- name: Bundle UI
run: |
npm i
gulp bundle