Skip to content

Commit 48905d1

Browse files
chore(DVIZ-24): add initial github actions configuration
1 parent 6cc9664 commit 48905d1

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "maven"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
open-pull-requests-limit: 1

.github/workflows/release.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Build and Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- release/*
8+
workflow_dispatch:
9+
10+
11+
jobs:
12+
build_and_release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v3
17+
18+
- name: Set up QEMU
19+
uses: docker/setup-qemu-action@v3
20+
with:
21+
platforms: linux/amd64,linux/arm64
22+
23+
- name: Set up Docker Buildx
24+
uses: docker/setup-buildx-action@v2
25+
26+
- name: Login to Docker Registry
27+
uses: docker/login-action@v3
28+
with:
29+
registry: ${{ vars.DOCKER_REGISTRY }}
30+
username: ${{ secrets.DOCKER_USERNAME }}
31+
password: ${{ secrets.DOCKER_PASSWORD }}
32+
33+
- name: Determine the version tag
34+
id: version
35+
run: |
36+
if [ "${{ github.event_name }}" = "release" ]; then
37+
echo "Using release tag: ${{ github.ref_name }}"
38+
echo "version=${{ github.ref_name }}" >> $GITHUB_OUTPUT
39+
else
40+
echo "No release detected. Using tag: latest"
41+
echo "version=latest" >> $GITHUB_OUTPUT
42+
fi
43+
44+
- name: Build and push Docker image
45+
uses: docker/build-push-action@v6
46+
with:
47+
platforms: linux/amd64,linux/arm64
48+
context: .
49+
push: true
50+
tags: ${{ vars.DOCKER_REGISTRY }}/data-viz-admin:${{ steps.version.outputs.version }}
51+

0 commit comments

Comments
 (0)