Skip to content

Commit

Permalink
JH: update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
adeepn committed Sep 5, 2023
1 parent 68a9428 commit 9953d50
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions .github/workflows/jh-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
version: ${{ steps.version.outputs.version }}
steps:
- name: Checkout the repository
uses: actions/checkout@v3.5.2
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -36,12 +36,16 @@ jobs:
name: Build ${{ matrix.arch }} base image
needs: init
runs-on: ${{ vars.RUNNER }}
permissions:
contents: read
id-token: write
packages: write
strategy:
matrix:
arch: ${{ fromJson(needs.init.outputs.architectures) }}
steps:
- name: Checkout the repository
uses: actions/checkout@v3.5.2
uses: actions/checkout@v4

- name: Get changed files
id: changed_files
Expand Down Expand Up @@ -78,16 +82,9 @@ jobs:
apk: "mariadb-dev;postgresql-dev;libffi-dev"
requirements: "requirements.txt"

- name: Login to DockerHub
if: github.event_name == 'release'
uses: docker/[email protected]
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to GitHub Container Registry
if: github.event_name == 'release'
uses: docker/login-action@v2.1.0
uses: docker/login-action@v2.2.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
Expand All @@ -98,12 +95,13 @@ jobs:
run: echo "BUILD_ARGS=--test" >> $GITHUB_ENV

- name: Build base image
uses: jethub-homeassistant/builder@2023.03.0
uses: jethub-homeassistant/builder@2023.08.0
with:
args: |
$BUILD_ARGS \
--${{ matrix.arch }} \
--target /data \
--cosign \
--generic ${{ needs.init.outputs.version }}
env:
CAS_API_KEY: ${{ secrets.CAS_TOKEN }}

0 comments on commit 9953d50

Please sign in to comment.