Merge pull request #264 from dianlight/devrelease/sambanas #84
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Image CI - Build Pre-Release | |
on: | |
push: | |
branches: | |
- prerelease/* | |
workflow_dispatch: | |
permissions: | |
pull-requests: 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: .beta${{ github.run_number }} | |
get: true | |
append: true | |
- name: ✍🏼 BetaName SambaNAs | |
id: betaname_set | |
uses: endaft/[email protected] | |
with: | |
file: ./sambanas/config.yaml | |
path: name | |
set: -β | |
get: true | |
append: true | |
- name: Publish SambaNAS Addon ${{ steps.version_set.outputs.value_new }} | |
uses: home-assistant/builder@master | |
env: | |
CAS_API_KEY: ${{ secrets.CAS_API_KEY }} | |
with: | |
args: | | |
--all \ | |
--target sambanas \ | |
--docker-hub dianlight | |
- name: Create pull request for Beta Repository | |
uses: thzois/[email protected] | |
continue-on-error: true | |
env: | |
GH_ACCESS_TOKEN: ${{ secrets.API_TOKEN_GITHUB }} | |
with: | |
git_config_user_email: '[email protected]' | |
git_config_user_name: 'ffp-bot' | |
target_repo: 'dianlight/hassio-addons-beta' | |
source_dir: 'sambanas' | |
# source_dir_copy_glob: '!(*.yaml)' | |
target_dir: '' | |
pr_target_repo_base_branch: 'master' | |
# pr_target_repo_compare_branch: 'autobot/${{ steps.version_set.outputs.value_new }}' | |
# pr_title: '[autobot] ${{ steps.version_set.outputs.value_new }} Automated changes' | |
# pr_description_text: '[autobot] ${{ steps.version_set.outputs.value_new }} Automated changes' | |
# pr_label: 'autobot' | |
- name: Restoring original repository | |
shell: bash | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "Prerelease Bot" | |
git restore . | |
git clean -f | |
- name: pull-request ${{ steps.version_set.outputs.value_old }} | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
continue-on-error: true | |
shell: bash | |
run: | | |
gh pr create --title "Releasing ${{ github.ref }}" --body ":crown: *An automated PR*" | |
# gh pr create --base "release/${{ steps.extract_branch.outputs.BR_VERSION }}" --title "Releasing ${{ github.ref }} into release" --body ":crown: *An automated PR*" | |