browsers/.forgejo/workflows/build.yaml

42 lines
1,013 B
YAML
Raw Normal View History

2025-01-05 04:08:19 +01:00
name: build image
2025-01-05 04:03:09 +01:00
on:
pull_request:
types:
- synchronize
push:
branches:
- main
schedule:
- cron: '0 0 * * 0'
2025-01-05 04:03:09 +01:00
workflow_dispatch: {}
jobs:
build:
runs-on: docker
steps:
- name: Checkout the repository
uses: actions/checkout@v4
2025-01-05 16:39:05 +01:00
- name: Install docker
run: apt-get update && apt-get install -y --no-install-recommends docker.io
- name: Login to registry
run: |
echo ${REGISTRY_TOKEN} \
2025-01-05 16:39:05 +01:00
| docker login -u ${REGISTRY_USER} --password-stdin code.bcarlin.net
env:
REGISTRY_USER: ${{ vars.REGISTRY_USER }}
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
- name: Build image
run: |
docker build --no-cache -t code.bcarlin.net/oci/browsers:latest .
- name: Push image
run: |
2025-01-05 16:39:05 +01:00
docker push code.bcarlin.net/oci/browsers:latest
2025-01-05 16:41:52 +01:00
- name: logout from repository
if: always()
run: |
docker logout code.bcarlin.net