renaming/restructuring

This commit is contained in:
buanet
2021-08-28 23:45:14 +02:00
parent 6734e3f5e1
commit d904c7d9dd
10 changed files with 16 additions and 18 deletions

View File

@@ -1,5 +1,5 @@
# Github action to build Docker image from dev branch (tag: dev) # Github action to build Docker image from dev branch (tag: dev)
name: Build slim image from dev name: Build debian based image from dev
on: on:
workflow_dispatch: workflow_dispatch:
@@ -8,7 +8,7 @@ on:
- dev - dev
jobs: jobs:
bulid-dev-slim: bulid-dev:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout repo (dev) - name: Checkout repo (dev)
@@ -30,11 +30,11 @@ jobs:
echo "This is the Buildnumber/Timestamp: $DATI" echo "This is the Buildnumber/Timestamp: $DATI"
echo "dati=$DATI" >> $GITHUB_ENV echo "dati=$DATI" >> $GITHUB_ENV
# startup script # startup script
sed -e "s/\${VERSION}/$VERSION-slim-dev/" -e "s/\${BUILD}/$DATI/" ./slim/scripts/iobroker_startup.sh > ./slim/scripts/iobroker_startup.tmp sed -e "s/\${VERSION}/$VERSION-dev/" -e "s/\${BUILD}/$DATI/" ./debian/scripts/iobroker_startup.sh > ./debian/scripts/iobroker_startup.tmp
mv -f ./slim/scripts/iobroker_startup.tmp ./slim/scripts/iobroker_startup.sh mv -f ./debian/scripts/iobroker_startup.tmp ./debian/scripts/iobroker_startup.sh
# amd64 # amd64
sed -e "s/\${VERSION}/$VERSION-slim-dev/" -e "s/\${DATI}/$DATI/" ./slim/Dockerfile-slim-amd64 > ./slim/Dockerfile-slim-amd64.tmp sed -e "s/\${VERSION}/$VERSION-dev/" -e "s/\${DATI}/$DATI/" ./debian/Dockerfile-amd64 > ./debian/Dockerfile-amd64.tmp
mv -f ./slim/Dockerfile-slim-amd64.tmp ./slim/Dockerfile-slim-amd64 mv -f ./debian/Dockerfile-amd64.tmp ./debian/Dockerfile-amd64
- name: Set up manifest tool - name: Set up manifest tool
run: | run: |
@@ -64,20 +64,20 @@ jobs:
- name: Build Docker image (slim-amd64) - name: Build Docker image (slim-amd64)
uses: docker/build-push-action@v2.6.1 uses: docker/build-push-action@v2.6.1
with: with:
context: ./slim context: ./debian
file: ./slim/Dockerfile-slim-amd64 file: ./debian/Dockerfile-amd64
push: true push: true
platforms: linux/amd64 platforms: linux/amd64
tags: | tags: |
buanet/iobroker:dev-slim-amd64, buanet/iobroker:dev-amd64,
ghcr.io/buanet/iobroker:dev-slim-amd64 ghcr.io/buanet/iobroker:dev-amd64
- name: Create and push manifests - name: Create and push manifests
run: | run: |
sed -e "s/\${VERSION}/dev-slim/g" -e "s/\${DOCKERTAG}/dev-slim/g" ./manifest.yml > manifest_dev-slim.yaml sed -e "s/\${VERSION}/dev/g" -e "s/\${DOCKERTAG}/dev/g" ./manifest.yml > manifest_dev.yaml
#./manifest-tool --username ${{ secrets.DOCKER_USER }} --password ${{ secrets.DOCKER_PASS }} push from-spec manifest_dev-slim.yaml #./manifest-tool --username ${{ secrets.DOCKER_USER }} --password ${{ secrets.DOCKER_PASS }} push from-spec manifest_dev.yaml
sed -e "s/\${VERSION}/dev-slim/g" -e "s/\${DOCKERTAG}/dev-slim/g" ./manifest_ghcr.yml > manifest_ghcr_dev-slim.yaml sed -e "s/\${VERSION}/dev/g" -e "s/\${DOCKERTAG}/dev/g" ./manifest_ghcr.yml > manifest_ghcr_dev.yaml
#./manifest-tool --username ${{ secrets.PACKAGES_USER }} --password ${{ secrets.PACKAGES_PASS }} push from-spec manifest_ghcr_dev-slim.yaml #./manifest-tool --username ${{ secrets.PACKAGES_USER }} --password ${{ secrets.PACKAGES_PASS }} push from-spec manifest_ghcr_dev.yaml
- name: Delete untagged images from GitHub packages - name: Delete untagged images from GitHub packages
uses: actions/github-script@v3 uses: actions/github-script@v3

View File

@@ -15,8 +15,10 @@ RUN apt-get update && apt-get install -y \
gosu \ gosu \
jq \ jq \
locales \ locales \
procps \
sudo \ sudo \
udev \ udev \
wget \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
# Install node # Install node
@@ -51,10 +53,6 @@ RUN apt-get update \
&& echo $(hostname) > /opt/.firstrun \ && echo $(hostname) > /opt/.firstrun \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
# Install node-gyp
# WORKDIR /opt/iobroker/
# RUN npm install -g node-gyp
# Backup initial ioBroker and userscript folder # Backup initial ioBroker and userscript folder
RUN tar -cf /opt/initial_iobroker.tar /opt/iobroker \ RUN tar -cf /opt/initial_iobroker.tar /opt/iobroker \
&& tar -cf /opt/initial_userscripts.tar /opt/userscripts && tar -cf /opt/initial_userscripts.tar /opt/userscripts