Skip to content

Commit

Permalink
Update build.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
unl0ck authored Nov 22, 2023
1 parent 47cd258 commit d53d765
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
changed: ${{ steps.changed_addons.outputs.changed }}
steps:
- name: Check out the repository
uses: actions/checkout@v3.0.2
uses: actions/checkout@v4.1.1

- name: Get changed files
id: changed_files
Expand Down Expand Up @@ -51,8 +51,8 @@ jobs:
if [[ -n ${changed} ]]; then
echo "Changed add-ons: $changed";
echo "::set-output name=changed::true";
echo "::set-output name=addons::[$changed]";
echo "changed=true" >> $GITHUB_OUTPUT;
echo "addons=[$changed]" >> $GITHUB_OUTPUT;
else
echo "No add-on had any monitored files changed (${{ env.MONITORED_FILES }})";
fi
Expand All @@ -68,7 +68,7 @@ jobs:

steps:
- name: Check out repository
uses: actions/checkout@v3.0.2
uses: actions/checkout@v4.1.1

- name: Get information
id: info
Expand All @@ -80,23 +80,23 @@ jobs:
id: check
run: |
if [[ "${{ steps.info.outputs.architectures }}" =~ ${{ matrix.arch }} ]]; then
echo "::set-output name=build_arch::true";
echo "::set-output name=image::$(echo ${{ steps.info.outputs.image }} | cut -d'/' -f3)";
echo "build_arch=true" >> $GITHUB_OUTPUT;
echo "image=$(echo ${{ steps.info.outputs.image }} | cut -d'/' -f3)" >> $GITHUB_OUTPUT;
if [[ -z "${{ github.head_ref }}" ]] && [[ "${{ github.event_name }}" == "push" ]]; then
echo "BUILD_ARGS=" >> $GITHUB_ENV;
fi
else
echo "${{ matrix.arch }} is not a valid arch for ${{ matrix.addon }}, skipping build";
echo "::set-output name=build_arch::false";
echo "build_arch=false" >> $GITHUB_OUTPUT;
fi
- name: Login to GitHub Container Registry
if: env.BUILD_ARGS != '--test'
uses: docker/login-action@v2.0.0
uses: docker/login-action@v3.0.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
password: ${{ secrets.TOKEN }}

- name: Build ${{ matrix.addon }} add-on
if: steps.check.outputs.build_arch == 'true'
Expand All @@ -107,5 +107,5 @@ jobs:
--${{ matrix.arch }} \
--target /data/${{ matrix.addon }} \
--image "${{ steps.check.outputs.image }}" \
--docker-hub "ghcr.io/${{ github.repository }}" \
--docker-hub "ghcr.io/${{ github.repository_owner }}" \
--addon

0 comments on commit d53d765

Please sign in to comment.