Skip to content

Commit

Permalink
chore: update github action for building images with different feature
Browse files Browse the repository at this point in the history
  • Loading branch information
vicanso committed Feb 15, 2025
1 parent 13a8665 commit e9826a6
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ jobs:
docker:
runs-on: ubuntu-22.04
timeout-minutes: 3600
strategy:
matrix:
features: ['latest', 'full']
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
Expand Down Expand Up @@ -178,6 +181,15 @@ jobs:
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Set build args
shell: bash
id: build_args
run: |
if [ "${{ matrix.features }}" = "latest" ]; then
BUILD_ARGS="--features="
else
BUILD_ARGS="--features=${{ matrix.features }}"
fi
- name: Build and push
id: docker_build
uses: docker/build-push-action@v6
Expand All @@ -186,7 +198,7 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
build-args: |
BUILD_ARGS=--features=full
BUILD_ARGS=${{ steps.build_args.outputs.BUILD_ARGS }}
- name: Image digest
run: |
echo ${{ steps.docker_build.outputs.digest }}

0 comments on commit e9826a6

Please sign in to comment.