Skip to content

Commit

Permalink
Issue #3673: start with a local composite action
Browse files Browse the repository at this point in the history
  • Loading branch information
bschmalhofer committed Aug 10, 2024
1 parent 193516d commit 1cb4509
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 2 deletions.
29 changes: 29 additions & 0 deletions .github/actions/docker_image_builder/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
%YAML 1.1
---

# Local composite action for building Docker images and pushing them to Docker Hub.
# Intended to be uses by the workflows docker_image_builder_rel.yml and
# docker_image_builder_devel.yml
name: 'DockerImageBuilder'

description: 'Composite action for building Docker images and pushing them to Docker Hub'

inputs:
dummy-input:
description: 'only as a test'
required: true

outputs:

runs:

using: 'composite'

steps:

- name: 'devel output'
run: |
echo 'inputs.dummy-input: ${{ inputs.dummy-input }}'
- name: 'Set up Docker Buildx'
uses: docker/setup-buildx-action@v3
8 changes: 6 additions & 2 deletions .github/workflows/docker_image_builder_devel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,13 @@ jobs:
- '${{ matrix.context }}/**'
-
name: Set up Docker Buildx
# Uses a local composite action.
# The repository must already be checked out.
name: 'Run local composite action'
if: steps.changes.outputs.context == 'true'
uses: docker/setup-buildx-action@v3
uses: ./.github/actions/docker_image_builder
with:
dummy-input: 'just testing. devel'

-
# Build the image but do not push it to Docker Hub yet.
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/docker_image_builder_rel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,15 @@ jobs:
echo 'github.ref_name: ${{ github.ref_name }}'
echo 'github.ref_type: ${{ github.ref_type }}'
echo 'github.event_name: ${{ github.event_name }}'
- name: 'check out the relevant OTOBO branch'
uses: actions/checkout@v4

-
# Uses a local composite action.
# The repository must already be checked out.
name: 'Run local composite action'
#if: steps.changes.outputs.context == 'true'
uses: ./.github/actions/docker_image_builder
with:
dummy-input: 'just testing, rel'

0 comments on commit 1cb4509

Please sign in to comment.