Skip to content

Commit

Permalink
chore: update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
jcwillox committed Feb 4, 2023
1 parent 826ebb8 commit 0826dc9
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 16 deletions.
26 changes: 16 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'Publish'
name: "Publish"

on:
release:
Expand All @@ -12,35 +12,41 @@ jobs:
name: Publish
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v2
- name: "Checkout the repository"
uses: actions/checkout@v3
with:
ref: main
- name: Setup yq

- name: "Setup yq"
uses: frenck/action-setup-yq@v1
- name: Update version and changelog

- name: "Update version and changelog"
run: |
yq -i '.version = "${{ github.event.release.tag_name }}"' $TARGET/config.yaml
echo -e "## What’s changed\n" > $TARGET/CHANGELOG.md
jq --raw-output '.release.body // empty' "${{ github.event_path }}" >> $TARGET/CHANGELOG.md
- name: Commit & push changes
- name: "Commit & push changes"
run: |
git config user.name github-actions
git config user.email [email protected]
git add .
git commit -m "🎉 Release ${{ github.event.release.tag_name }}"
git push
- name: Get addon information and update build args
- name: "Get addon information and update build args"
id: information
uses: ./.github/actions/addon-info
- name: Login to GitHub Container Registry
uses: docker/login-action@v1

- name: "Login to GitHub Container Registry"
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Publish

- name: "Publish"
uses: home-assistant/builder@master
with:
args: |
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'Test'
name: "Test"

on:
push:
Expand All @@ -17,14 +17,17 @@ jobs:
name: Test Build
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v2
- name: Setup yq
- name: "Checkout the repository"
uses: actions/checkout@v3

- name: "Setup yq"
uses: frenck/action-setup-yq@v1
- name: Get addon information and update build args

- name: "Get addon information and update build args"
id: information
uses: ./.github/actions/addon-info
- name: Test build

- name: "Test build"
uses: home-assistant/builder@master
with:
args: |
Expand Down

0 comments on commit 0826dc9

Please sign in to comment.