Skip to content

Commit

Permalink
Added to build image of fluentd / grafana for workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
taketo1113 committed Nov 8, 2023
1 parent 34f804d commit b9f03fb
Showing 1 changed file with 70 additions and 0 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/build-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,73 @@ jobs:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

build-image-fluentd:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/fluentd
tags: |
# set latest tag for default branch
#type=raw,value=latest,enable={{is_default_branch}}
type=raw,value=test
- name: Build and push Docker image (fluentd)
uses: docker/build-push-action@v5
with:
context: ./fluentd
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

build-image-grafana:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/grafana
tags: |
# set latest tag for default branch
#type=raw,value=latest,enable={{is_default_branch}}
type=raw,value=test
- name: Build and push Docker image (grafana)
uses: docker/build-push-action@v5
with:
context: ./grafana
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit b9f03fb

Please sign in to comment.