31 lines
831 B
YAML
31 lines
831 B
YAML
name: Build and publish image
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches: [main]
|
|
schedule:
|
|
- cron: "17 3 * * *"
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
|
|
jobs:
|
|
image:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Check scripts
|
|
run: ./tests/check.sh
|
|
- name: Log in to GitHub Container Registry
|
|
if: github.event_name != 'pull_request'
|
|
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io --username "${{ github.actor }}" --password-stdin
|
|
- name: Build image
|
|
env:
|
|
OCI_REVISION: ${{ github.sha }}
|
|
OCI_SOURCE: https://github.com/rogeecn/fingerprint-chromium
|
|
PUSH: ${{ github.event_name != 'pull_request' }}
|
|
run: ./scripts/build.sh ghcr.io/rogeecn/fingerprint-chromium
|