Skip to content

Docker build and publish #8

Docker build and publish

Docker build and publish #8

Workflow file for this run

name: Docker build and publish
on:
release:
types: [published]
jobs:
build-amd64:
if: {{ vars.AMD64 == 'true' }}

Check failure on line 9 in .github/workflows/publish.yml

View workflow run for this annotation

GitHub Actions / Docker build and publish

Invalid workflow file

The workflow is not valid. .github/workflows/publish.yml (Line: 9, Col: 9): A mapping was not expected
name: Build and publish amd64 image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get version
env:
TAG_NAME: ${{ github.event.release.tag_name }}
run: echo "VERSION=${TAG_NAME#v}" >> $GITHUB_ENV
- name: Patch files
uses: onlyutkarsh/[email protected]
with:
files: |
nightscout/config.json
patch-syntax: |
= /version => "${{ env.VERSION }}"
- name: publish amd64 docker files
if: github.event_name != 'pull_request'
run: docker run --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock -v ~/.docker:/root/.docker -v "$(pwd)":/data homeassistant/amd64-builder -t nightscout --amd64 --release-tag --docker-user ihlcz --docker-password ${{ secrets.DOCKER_PASSWORD }}
build-aarch64:
name: Build and publish aarch64 image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get version
env:
TAG_NAME: ${{ github.event.release.tag_name }}
run: echo "VERSION=${TAG_NAME#v}" >> $GITHUB_ENV
- name: Patch files
uses: onlyutkarsh/[email protected]
with:
files: |
nightscout/config.json
patch-syntax: |
= /version => "${{ env.VERSION }}"
- name: publish aarch64 docker files
if: github.event_name != 'pull_request'
run: docker run --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock -v ~/.docker:/root/.docker -v "$(pwd)":/data homeassistant/amd64-builder -t nightscout --aarch64 --release-tag --docker-user ihlcz --docker-password ${{ secrets.DOCKER_PASSWORD }}
#update-main-repo:
# needs: [build-amd64, build-aarch64]
# name: Update addons repository
# runs-on: ubuntu-latest
# container:
# image: hassioaddons/repository-updater:latest
# steps:
# - name: upload
# run: repository-updater --token ${{ secrets.GIT_TOKEN }} --repository i-cz/addons-repository --addon nightscout