Skip to content
name: Docker Image CI - Build Dev
on:
push:
branches:
- devrelease/*
workflow_dispatch:
permissions:
pull-requests: write
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: ✍🏼 version SambaNAs
id: version_set
uses: endaft/[email protected]
with:
file: ./sambanas/config.yaml
path: version
set: .dev${{ github.run_number }}
get: true
append: true
- name: Publish SambaNAS Addon ${{ steps.version_set.outputs.value_old }}
uses: home-assistant/builder@master
env:
CAS_API_KEY: ${{ secrets.CAS_API_KEY }}
with:
args: |
--aarch64 \
--target sambanas \
--docker-hub dianlight
- name: Extract branch name
shell: bash
run: echo "BR_VERSION=${GITHUB_REF##*/}" >> "$GITHUB_OUTPUT"
id: extract_branch
- name: pull-request
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
continue-on-error: true
shell: bash
run: |
git config --global user.email "[email protected]"
git config --global user.name "Prerelease Bot"
git branch -f "prerelease/${{ steps.extract_branch.outputs.BR_VERSION }}_${{ steps.version_set.outputs.value_old }}" HEAD
git push -u origin "prerelease/${{ steps.extract_branch.outputs.BR_VERSION }}_${{ steps.version_set.outputs.value_old }}"
gh pr create --base "prerelease/${{ steps.extract_branch.outputs.BR_VERSION }}_${{ steps.version_set.outputs.value_old }}" --title "Releasing ${{ github.ref }} into prerelease" --body ":crown: *An automated PR*"