* Add switch for clean Docker image preparation * Link image to our GitHub repository * Switch to Github repo * Minimal variant * Rename
38 lines
917 B
YAML
38 lines
917 B
YAML
name: Build Docker image
|
|
on:
|
|
# Trigger the workflow on push but only for the main branch
|
|
push:
|
|
branches:
|
|
- master
|
|
# Trigger manually
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: Build Docker image
|
|
runs-on: ubuntu-latest
|
|
if: ${{ github.repository_owner == 'Armbian' }}
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Login to GitHub Container Registry
|
|
uses: docker/login-action@v1
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.CR_PAT }}
|
|
|
|
- name: Build Docker image
|
|
|
|
run: |
|
|
sed -i "s/-it --rm/-i --rm/" config/templates/config-docker.conf
|
|
touch .ignore_changes
|
|
./compile.sh docker JUST_INIT="yes"
|
|
docker tag armbian:$(cat VERSION) ghcr.io/armbian/build:$(cat VERSION)
|
|
|
|
- name: Push Docker image
|
|
run: docker push ghcr.io/armbian/build:$(cat VERSION)
|