refactor: standardize workflow name and move env to workflow level
- Change name to 'CI' (consistent with template) - Move REGISTRY, IMAGE to workflow-level env (shared by both jobs) - Compact 'on:' branches syntax - Maintain all service-specific features (Delete old latest, build-arg) No functional change, pure standardization to match template pattern.
This commit is contained in:
@@ -1,12 +1,14 @@
|
|||||||
name: Build & Push Portfolio Image
|
name: CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches: [main]
|
||||||
- main
|
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches: [main]
|
||||||
- main
|
|
||||||
|
env:
|
||||||
|
REGISTRY: forgejo.riotpiao.com
|
||||||
|
IMAGE: forgejo.riotpiao.com/rock/portfolio
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
@@ -30,9 +32,6 @@ jobs:
|
|||||||
needs: test
|
needs: test
|
||||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||||
runs-on: node
|
runs-on: node
|
||||||
env:
|
|
||||||
REGISTRY: forgejo.riotpiao.com
|
|
||||||
IMAGE: forgejo.riotpiao.com/rock/portfolio
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install Node.js and Docker
|
- name: Install Node.js and Docker
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user