Skip to content

Commit

Permalink
Fixed reference to secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
ckulka committed Apr 20, 2024
1 parent 6f09043 commit 50f44fa
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 52 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/build-experimental.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# See
# - https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
# - https://docs.github.com/en/actions/learn-github-actions/contexts
# - https://github.com/docker/build-push-action/blob/master/docs/advanced/multi-platform.md
name: Build experimental images

on:
push:
branches:
- master
paths:
- .github/workflows/docker-build.yml
- "*.dockerfile"
- files/**

jobs:
apache:
name: Apache
uses: ./.github/workflows/build-job.yaml
with:
dockerfile: apache.dockerfile
tags: |
ckulka/baikal:experimental-apache
ckulka/baikal:experimental
secrets: inherit

apache_php82:
name: Apache (PHP 8.2)
uses: ./.github/workflows/build-job.yaml
with:
dockerfile: apache-php8.2.dockerfile
tags: |
ckulka/baikal:experimental-apache-php8.2
ckulka/baikal:experimental-php8.2
secrets: inherit

nginx:
name: Nginx
uses: ./.github/workflows/build-job.yaml
with:
dockerfile: nginx.dockerfile
tags: ckulka/baikal:experimental-nginx
secrets: inherit

nginx_php82:
name: Apache (PHP 8.2)
uses: ./.github/workflows/build-job.yaml
with:
dockerfile: nginx-php8.2.dockerfile
tags: ckulka/baikal:experimental-nginx-php8.2
secrets: inherit
7 changes: 7 additions & 0 deletions .github/workflows/build-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ on:
description: Tags to apply to the image
required: true
type: string
secrets:
DOCKERHUB_USERNAME:
description: DockerHub username
required: true
DOCKERHUB_PASSWORD:
description: DockerHub password
required: true

jobs:
build:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,9 @@
# - https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
# - https://docs.github.com/en/actions/learn-github-actions/contexts
# - https://github.com/docker/build-push-action/blob/master/docs/advanced/multi-platform.md
name: docker build
name: Build release images

on:
push:
branches:
- master
paths:
- .github/workflows/docker-build.yml
- "*.dockerfile"
- files/**
release:
types:
- published
Expand All @@ -28,18 +21,8 @@ jobs:
id: parse-release-tag
run: echo tag=${GITHUB_REF_NAME/+*/} >> "$GITHUB_OUTPUT"

apache_experimental:
name: Apache (experimental)
if: github.event_name == 'push'
uses: ./.github/workflows/build-job.yaml
with:
dockerfile: apache.dockerfile
tags: |
ckulka/baikal:experimental-apache
ckulka/baikal:experimental
apache_release:
name: Apache (release)
apache:
name: Apache
needs: parse_release_tag
uses: ./.github/workflows/build-job.yaml
with:
Expand All @@ -49,19 +32,10 @@ jobs:
ckulka/baikal:${{ needs.parse_release_tag.outputs.tag }}
ckulka/baikal:apache
ckulka/baikal:latest
secrets: inherit

apache_experimental_php82:
name: Apache + PHP 8.2 (experimental)
if: github.event_name == 'push'
uses: ./.github/workflows/build-job.yaml
with:
dockerfile: apache-php8.2.dockerfile
tags: |
ckulka/baikal:experimental-apache-php8.2
ckulka/baikal:experimental-php8.2
apache_release_php82:
name: Apache + PHP 8.2 (release)
apache_php82:
name: Apache (PHP 8.2)
needs: parse_release_tag
uses: ./.github/workflows/build-job.yaml
with:
Expand All @@ -70,37 +44,24 @@ jobs:
ckulka/baikal:${{ needs.parse_release_tag.outputs.tag }}-apache-php8.2
ckulka/baikal:${{ needs.parse_release_tag.outputs.tag }}-php8.2
ckulka/baikal:apache-php8.2
secrets: inherit

nginx_experimental:
name: Nginx (experimental)
if: github.event_name == 'push'
uses: ./.github/workflows/build-job.yaml
with:
dockerfile: nginx.dockerfile
tags: ckulka/baikal:experimental-nginx

nginx_release:
name: Apache (release)
nginx:
name: Nginx
needs: parse_release_tag
uses: ./.github/workflows/build-job.yaml
with:
dockerfile: nginx.dockerfile
tags: |
ckulka/baikal:${{ needs.parse_release_tag.outputs.tag }}-nginx
ckulka/baikal:nginx
secrets: inherit

nginx_experimental_php82:
name: Apache + PHP 8.2 (experimental)
if: github.event_name == 'push'
uses: ./.github/workflows/build-job.yaml
with:
dockerfile: nginx-php8.2.dockerfile
tags: ckulka/baikal:experimental-nginx-php8.2

nginx_release_php82:
name: Apache + PHP 8.2 (release)
nginx_php82:
name: Nginx (PHP 8.2)
needs: parse_release_tag
uses: ./.github/workflows/build-job.yaml
with:
dockerfile: nginx-php8.2.dockerfile
tags: ckulka/baikal:${{ needs.parse_release_tag.outputs.tag }}-nginx-php8.2
secrets: inherit

0 comments on commit 50f44fa

Please sign in to comment.