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:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
branches: [main]
|
||||
|
||||
env:
|
||||
REGISTRY: forgejo.riotpiao.com
|
||||
IMAGE: forgejo.riotpiao.com/rock/portfolio
|
||||
|
||||
jobs:
|
||||
test:
|
||||
@@ -30,9 +32,6 @@ jobs:
|
||||
needs: test
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||
runs-on: node
|
||||
env:
|
||||
REGISTRY: forgejo.riotpiao.com
|
||||
IMAGE: forgejo.riotpiao.com/rock/portfolio
|
||||
steps:
|
||||
- name: Install Node.js and Docker
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user