Compare commits
3 Commits
dev
...
8db2ecfefe
| Author | SHA1 | Date | |
|---|---|---|---|
| 8db2ecfefe | |||
| 4621c0d5ca | |||
| 35c40791e6 |
@@ -4,20 +4,25 @@ import com.google.auth.oauth2.GoogleCredentials;
|
|||||||
import com.google.firebase.FirebaseApp;
|
import com.google.firebase.FirebaseApp;
|
||||||
import com.google.firebase.FirebaseOptions;
|
import com.google.firebase.FirebaseOptions;
|
||||||
import com.google.firebase.messaging.FirebaseMessaging;
|
import com.google.firebase.messaging.FirebaseMessaging;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.core.io.ClassPathResource;
|
import org.springframework.core.io.ClassPathResource;
|
||||||
|
|
||||||
|
import java.io.FileInputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
public class FirebaseConfig {
|
public class FirebaseConfig {
|
||||||
|
|
||||||
|
@Value("${firebase.credentials.path}")
|
||||||
|
private String credentialsPath;
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public FirebaseApp firebaseApp() throws IOException {
|
public FirebaseApp firebaseApp() throws IOException {
|
||||||
GoogleCredentials credentials = GoogleCredentials
|
GoogleCredentials credentials = GoogleCredentials
|
||||||
.fromStream(new ClassPathResource("firebase.json").getInputStream())
|
.fromStream(new FileInputStream(credentialsPath))
|
||||||
.createScoped(List.of("https://www.googleapis.com/auth/firebase.messaging"));
|
.createScoped(List.of("https://www.googleapis.com/auth/firebase.messaging"));
|
||||||
|
|
||||||
FirebaseOptions options = FirebaseOptions.builder()
|
FirebaseOptions options = FirebaseOptions.builder()
|
||||||
|
|||||||
@@ -1,24 +0,0 @@
|
|||||||
name: CI - full
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
branches: [main]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
backend-test:
|
|
||||||
uses: ./.gitea/workflows/backend-test.yaml
|
|
||||||
|
|
||||||
frontend-build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
working-directory: frontend
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 20
|
|
||||||
- name: Install dependencies
|
|
||||||
run: npm ci
|
|
||||||
- name: Build frontend
|
|
||||||
run: npx expo export --platform web
|
|
||||||
Reference in New Issue
Block a user