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:
|
2025-01-05 16:46:41 +01:00
|
|
|
- cron: '0 0 * * 0'
|
2025-01-05 04:03:09 +01:00
|
|
|
workflow_dispatch: {}
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: docker
|
|
|
|
steps:
|
2025-01-05 15:53:09 +01:00
|
|
|
- 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
|
2025-01-05 15:53:09 +01:00
|
|
|
|
|
|
|
- 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
|
2025-01-05 15:53:09 +01:00
|
|
|
env:
|
|
|
|
REGISTRY_USER: ${{ vars.REGISTRY_USER }}
|
|
|
|
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
2025-01-05 04:17:56 +01:00
|
|
|
|
|
|
|
- name: Build image
|
|
|
|
run: |
|
2025-01-25 00:28:42 +01:00
|
|
|
docker pull debian:latest
|
2025-01-05 16:43:11 +01:00
|
|
|
docker build --no-cache -t code.bcarlin.net/oci/browsers:latest .
|
2025-01-05 04:17:56 +01:00
|
|
|
|
|
|
|
- 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
|