Skip to content

Docker CI

Docker CI #133

Workflow file for this run

name: Docker CI
on:
workflow_dispatch:
push:
branches: [ main ]
paths-ignore:
- '.gitignore'
- 'README.md'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Configure Docker
env:
DOCKER_USER: ${{secrets.DOCKER_USER}}
DOCKER_TOKEN: ${{secrets.DOCKER_TOKEN}}
run: |
docker login -u $DOCKER_USER -p $DOCKER_TOKEN
- name: Set Version
run: |
echo "UNIFI_VERSION=$(wget --quiet --no-cookies https://dl.ui.com/unifi/debian/dists/stable/ubiquiti/binary-amd64/Packages -O - | sed -n 's/Version: //p')" >> $GITHUB_ENV
- name: Build 22.04
run: |
docker build . --pull --build-arg OCIE_VERSION=22.04 --build-arg UNIFI_VERSION=${{ env.UNIFI_VERSION }} --tag bshp/unifi:latest --no-cache
- name: Push 22.04
run: |
TAG=${{ env.UNIFI_VERSION}}
TAG=${TAG%%-*}
docker tag bshp/unifi:latest bshp/unifi:$TAG
docker push bshp/unifi:latest
docker push bshp/unifi:$TAG