Skip to content
Open
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
40 changes: 40 additions & 0 deletions .github/dev-build-config.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"components": [
{
"name": "qubership-consul-integration-tests",
"file": "integration-tests/docker/Dockerfile",
"context": ""
},
{
"name": "qubership-consul-disaster-recovery",
"file": "disaster-recovery/docker/Dockerfile",
"context": "disaster-recovery"
},
{
"name": "qubership-consul-transfer",
"file": "docker-transfer/Dockerfile",
"context": "."
},
{
"name": "qubership-consul-acl-configurator",
"file": "acl-configurator/consul-acl-configurator-operator/Dockerfile",
"context": "acl-configurator/consul-acl-configurator-operator"
},
{
"name": "qubership-consul-rest-acl-configurator",
"file": "acl-configurator/rest-acl-configurator/Dockerfile",
"context": "acl-configurator/rest-acl-configurator"
},
{
"name": "qubership-consul-backup-daemon",
"file": "backup-daemon/docker/Dockerfile",
"context": "backup-daemon"
},
{
"name": "qubership-consul-remove-tokens",
"file": "remove-tokens/docker/Dockerfile",
"context": "remove-tokens"
}
],
"platforms": "linux/amd64,linux/arm64"
}
100 changes: 100 additions & 0 deletions .github/workflows/dev_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: "CI: Dev Build"
run-name: "Dev image for ${{ github.event.repository.name }}: ${{ github.run_number }} - ${{ github.actor }}"
on:
release:
types: [created]
push:
branches:
- "**"
paths-ignore:
- "docs/**"
- "CODE-OF-CONDUCT.md"
- "CONTRIBUTING.md"
- "LICENSE"
- "README.md"
- "SECURITY.md"
pull_request:
branches:
- "**"
paths-ignore:
- "docs/**"
- "CODE-OF-CONDUCT.md"
- "CONTRIBUTING.md"
- "LICENSE"
- "README.md"
- "SECURITY.md"
workflow_dispatch:
inputs:
tags:
required: false
type: string
default: ""
description: "Tags"
dry-run:
required: true
type: boolean
default: false
description: "Dry run mode"
replace-symbol:
required: false
type: string
default: "_"
description: "Symbol to replace in tags"

permissions:
contents: read
packages: write

concurrency:
group: ${{ github.ref_type == 'branch' && format('build-branch-{0}', github.ref_name) || format('build-{0}', github.sha) }}
cancel-in-progress: true

jobs:
prepare:
name: "Prepare Images and Metadata"
runs-on: ubuntu-latest
outputs:
components: ${{ steps.load.outputs.components }}
platforms: ${{ steps.load.outputs.platforms }}
tags: "${{ steps.meta.outputs.result }}"
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- id: load
run: |
echo "components=$(jq -c '.components' .github/dev-build-config.cfg)" >> "$GITHUB_OUTPUT"
echo "platforms=$(jq -c '.platforms' .github/dev-build-config.cfg)" >> "$GITHUB_OUTPUT"

- name: Create tags for images
uses: netcracker/qubership-workflow-hub/actions/metadata-action@0f2be042d7c833c6bf60df85732609b7991fb821 #2.0.0
id: meta
with:
default-template: "{{ref-name}}"
extra-tags: ${{ github.event.inputs.tags || '' }}
replace-symbol: ${{ github.event.inputs.replace-symbol || '_'}}

build:
name: Build Docker Images
needs: [prepare]
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
fail-fast: false
matrix:
component: ${{ fromJson(needs.prepare.outputs.components) }}
steps:
- name: Docker
uses: netcracker/qubership-workflow-hub/actions/docker-action@0f2be042d7c833c6bf60df85732609b7991fb821 #2.0.0
with:
ref: ${{ github.ref }}
dry-run: ${{ github.event.inputs.dry-run || github.event_name == 'pull_request' }}
download-artifact: false
component: ${{ toJson(matrix.component) }}
platforms: ${{ needs.prepare.outputs.platforms }}
tags: ${{ needs.prepare.outputs.tags }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45 changes: 23 additions & 22 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,29 @@ permissions:
packages: write
actions: read
on:
release:
types: [created]
push:
branches:
- '**'
paths-ignore:
- 'docs/**'
- 'CODE-OF-CONDUCT.md'
- 'CONTRIBUTING.md'
- 'LICENSE'
- 'README.md'
- 'SECURITY.md'
pull_request:
branches:
- '**'
paths-ignore:
- 'docs/**'
- 'CODE-OF-CONDUCT.md'
- 'CONTRIBUTING.md'
- 'LICENSE'
- 'README.md'
- 'SECURITY.md'
workflow_dispatch:
# release:
# types: [created]
# push:
# branches:
# - '**'
# paths-ignore:
# - 'docs/**'
# - 'CODE-OF-CONDUCT.md'
# - 'CONTRIBUTING.md'
# - 'LICENSE'
# - 'README.md'
# - 'SECURITY.md'
# pull_request:
# branches:
# - '**'
# paths-ignore:
# - 'docs/**'
# - 'CODE-OF-CONDUCT.md'
# - 'CONTRIBUTING.md'
# - 'LICENSE'
# - 'README.md'
# - 'SECURITY.md'

env:
TAG_NAME: ${{ github.event.release.tag_name || github.ref }}
Expand Down
Loading