You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a **GitHub repository** used to store and manage **build files**, **generated files**, or **automation results** made by other tools or workflows (like GitHub Actions or CI/CD pipelines).
7
+
This is a **GitHub repository** used to store and manage **build files**, **generated files**, or **automation results**.
8
8
9
9
- Why use this?
10
10
- Keeps the main source code clean by storing big or auto-made files separately.
11
-
- Other projects (like go-web-app) can download the required files as required.
12
-
13
-
## Creating a PAT Token
14
-
15
-
A GitHub PAT (Personal Access Token) is needed to upload files to the `go-api-artifacts` repository.
16
-
This token is stored in the GitHub Actions secret: `secrets.GO_API_ARTIFACTS_TOKEN`.
17
-
For more details, see [ci.yml](/.github/workflows/ci.yml).
18
-
19
-
> [!Important]
20
-
> Currently, the PAT token is created using the https://github.com/ifrcgo-dev account.
21
-
22
-
### How to create a new token:
23
-
24
-
-**Go to**: [GitHub Personal Access Tokens](https://github.com/settings/personal-access-tokens)
25
-
-**Token name**: `ifrc-go-artifacts-xyz` (replace `xyz` as needed)
26
-
-**Resource owner**: `IFRCGO`
27
-
-**Expiration**: No expiration
28
-
-**Repository access**: Only select repositories
29
-
- Select: `IFRCGo/go-api-artifacts`
30
-
-**Permissions**:
31
-
-**Repository permissions**:
32
-
-**Contents**: Read and write
11
+
- It helps avoid high costs from Git LFS - See https://github.com/IFRCGo/go-api/pull/2470#issuecomment-2861654878
12
+
13
+
> [!Note]
14
+
> Previously, GitHub Actions in go-api or related projects uploaded artifacts automatically from CI using a Personal Access Token (PAT).
15
+
> Now, CI only checks the current schema against the schema in **go-api-artifacts**.
16
+
> **go-api-artifacts** is used as a submodule in **go-api**.
17
+
18
+
## Developer Workflow
19
+
20
+
### openapi-schema.yaml
21
+
- Generate Schema File locally:
22
+
- The required artifact files (e.g., `openapi-schema.yaml` file) should be generated in the local clone of the go-api-artifacts repository.
23
+
- Commit and Push Schema:
24
+
- The generated files should be pushed to the go-api-artifacts repository.
25
+
- Update Submodule Reference:
26
+
- The commit reference should be updated in the main repo.
27
+
28
+
Command
29
+
```bash
30
+
docker compose run --rm serve ./manage.py spectacular --file .assets/openapi-schema.yaml
31
+
```
32
+
33
+
### 🚨 Manually added files
34
+
35
+
- In `go-api-artifacts`
36
+
- For any files **other than `openapi-schema.yaml`**
37
+
- Create a **new branch** in the `go-api-artifacts` repo.
38
+
- Add the files there.
39
+
- Open a **Pull Request in the `go-api-artifacts` repository**.
40
+
- In `go-api`
41
+
-**Update the submodule reference** in your `go-api` PR.
42
+
- In the corresponding **`go-api` Pull Request**, include the link to the `go-api-artifacts` PR as a *related PR* so reviewers can track both changes together.
0 commit comments