Skip to content

Commit

Permalink
Made the rest of the cicd pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Hans committed May 5, 2020
1 parent 62bc963 commit 1060edd
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 35 deletions.
68 changes: 34 additions & 34 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,37 +24,37 @@ jobs:
--docker-user ${{ secrets.DOCKER_USERNAME }} \
--docker-password ${{ secrets.DOCKER_PASSWORD }}
# publish:
# needs: build
# name: Publish release
# runs-on: ubuntu-latest
# steps:
# - name: Checkout add-on code
# uses: actions/checkout@v2
# with:
# persist-credentials: false
# path: addon
# - name: Checkout repository code
# uses: actions/checkout@v2
# with:
# persist-credentials: false
# repository: filii-lamberti/repository
# path: repository
# - name: Create local changes and commit files
# continue-on-error: true
# run: |
# ADDON_NAME=$( cut -c22- <<< ${{ github.repository }} )
# ADDON_VERSION=$( cut -c12- <<< ${{ github.ref }} )
# cp -v addon/README.md addon/filiibot/config.json repository/filiibot/
# cd repository
# sed -i "s/dev/$ADDON_VERSION/g" filiibot/config.json
# git config --local user.email "filii.lamberti@gmail.com"
# git config --local user.name "Filii Lamberti"
# git add .
# git commit -m "Upgrade $ADDON_NAME to v$ADDON_VERSION" -a
# - name: Push changes
# uses: ad-m/github-push-action@master
# with:
# github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
# directory: repository
# repository: filii-lamberti/repository
publish:
needs: build
name: Publish release
runs-on: ubuntu-latest
steps:
- name: Checkout add-on code
uses: actions/checkout@v2
with:
persist-credentials: false
path: addon
- name: Checkout repository code
uses: actions/checkout@v2
with:
persist-credentials: false
repository: Expaso/hassos-addons
path: repository
- name: Create local changes and commit files
continue-on-error: true
run: |
ADDON_NAME=$( cut -c22- <<< ${{ github.repository }} )
ADDON_VERSION=$( cut -c12- <<< ${{ github.ref }} )
cp -v addon/README.md addon/timescaledb/config.json repository/timescaledb
cd repository
sed -i "s/dev/$ADDON_VERSION/g" timescaledb/config.json
git config --local user.email "hans@expaso.nl"
git config --local user.name "Hans van Essen"
git add .
git commit -m "Upgrade $ADDON_NAME to v$ADDON_VERSION" -a
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
directory: repository
repository: Expaso/hassos-addons
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ jobs:
-v ~/.docker:/root/.docker \
-v /var/run/docker.sock:/var/run/docker.sock \
-v "$(pwd)":/data homeassistant/amd64-builder \
--test \
--target timescaledb --amd64 \
--docker-user ${{ secrets.DOCKER_USERNAME }} \
--docker-password ${{ secrets.DOCKER_PASSWORD }}
Expand Down
File renamed without changes.

0 comments on commit 1060edd

Please sign in to comment.