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

github workflow and update project to angular 18 #1

Merged
merged 7 commits into from
Nov 19, 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
17 changes: 0 additions & 17 deletions .browserslistrc

This file was deleted.

42 changes: 42 additions & 0 deletions .github/workflows/docker-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build and publish Docker image

on:
push:
branches: [ main, staging ]
paths:
- 'dist/**'

jobs:
build-and-push-image:
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v4.2.2

- name: Log in to the Container registry
uses: docker/login-action@v3.3.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v5.5.1
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=raw,value={{sha}}

- name: Build and push Docker image
uses: docker/build-push-action@v6.9.0
with:
push: true
file: docker/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,5 @@ testem.log
# System Files
.DS_Store
Thumbs.db

.angular
31 changes: 19 additions & 12 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@
"outputPath": "dist/apparel-top100-showcase",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"polyfills": [
"zone.js",
"@angular/localize/init"
],
"tsConfig": "tsconfig.app.json",
"inlineStyleLanguage": "scss",
"assets": [
Expand All @@ -33,8 +36,7 @@
"node_modules/bootstrap/dist/css/bootstrap.min.css",
"src/styles.scss"
],
"scripts": [
]
"scripts": []
},
"configurations": {
"production": {
Expand All @@ -56,12 +58,13 @@
"with": "src/environments/environment.prod.ts"
}
],
"outputHashing": "all"
"outputHashing": "all",
"optimization": true,
"sourceMap": false,
"extractLicenses": true
},
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
Expand All @@ -71,27 +74,29 @@
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"buildTarget": "apparel-top100-showcase:build"
},
"configurations": {
"production": {
"browserTarget": "apparel-top100-showcase:build:production"
"buildTarget": "apparel-top100-showcase:build:production"
},
"development": {
"browserTarget": "apparel-top100-showcase:build:development"
"buildTarget": "apparel-top100-showcase:build:development"
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "apparel-top100-showcase:build"
"buildTarget": "apparel-top100-showcase:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"inlineStyleLanguage": "scss",
Expand All @@ -107,5 +112,7 @@
}
}
},
"defaultProject": "apparel-top100-showcase"
}
"cli": {
"analytics": false
}
}
Loading