treetrail-frontend/.forgejo/workflows/build.yaml

53 lines
1.3 KiB
YAML
Raw Normal View History

2024-10-25 13:51:15 +02:00
on:
push:
2024-10-19 12:22:57 +02:00
jobs:
2024-10-19 12:29:53 +02:00
build:
2024-10-19 12:22:57 +02:00
runs-on: container
steps:
- uses: actions/checkout@v4
2024-10-19 12:22:57 +02:00
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
2024-11-01 06:34:41 +01:00
cache: "pnpm"
2024-10-19 12:22:57 +02:00
- name: Install dependencies
run: pnpm install
- name: Build package (transpile ts => js)
run: ng build
- name: Build container
2024-10-25 13:55:33 +02:00
uses: actions/buildah-build@v1
with:
image: treetrail-frontend
#tags: foo # v1 ${{ github.sha }}
containerfiles: |
./Containerfile
2024-10-25 13:51:15 +02:00
2024-11-01 06:34:41 +01:00
- name: Workaround for bug of podman-login
run: |
mkdir $HOME/.docker
echo "{ \"auths\": {} }" > $HOME/.docker/config.json
- name: Log in to container registry (with another workaround)
uses: actions/podman-login@v1
with:
registry: ${{ vars.REGISTRY }}
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }}
auth_file_path: /tmp/auth.json
2024-10-25 13:51:15 +02:00
- uses: actions/push-to-registry@v2
with:
2024-11-01 06:34:41 +01:00
registry: "docker://${{ vars.REGISTRY }}"
2024-10-25 13:51:15 +02:00
image: treetrail-frontend
tags: latest