Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: trigger internal CI on master commit #800

Merged
merged 7 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/on-master-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ jobs:
tags: |
type=raw,value=master-${{ needs.generate-tags.outputs.tag_date }}-${{ needs.generate-tags.outputs.short_sha }}
type=raw,value=master-latest
trigger_internal_ci: true

notify-slack:
name: Notify Slack
Expand Down
23 changes: 22 additions & 1 deletion .github/workflows/publish-docker-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,18 @@ on:
type: string
required: true
description: 'The images to publish'
trigger_internal_ci:
description: 'Trigger the internal CI'
required: false
type: boolean
default: false
workflow_dispatch:
inputs:
trigger_internal_ci:
description: 'Trigger the internal CI'
required: true
type: boolean
default: false

jobs:
build-and-push-image:
Expand Down Expand Up @@ -66,7 +77,7 @@ jobs:
tags: ${{ inputs.tags || format('type=raw,value={0}-{1}', github.ref_name, github.sha) }}

- name: Push to Registry(s)
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
platforms: ${{ github.event_name != 'pull_request' && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
Expand All @@ -84,3 +95,13 @@ jobs:
annotations: true
severity: LOW
dockerfile: ./Dockerfile

- name: Internal CI
uses: peter-evans/repository-dispatch@v3
if: ${{ inputs.trigger_internal_ci }}
continue-on-error: true
with:
token: ${{ secrets.INTERNAL_CI_TOKEN }}
repository: vechain/thor-internal-ci
event-type: internal-thor-ci
client-payload: '{"thor_image": "${{ fromJSON(steps.build-and-push-image.outputs.meta.json).tags[0] }}"}'
Loading