Skip to content

Commit 6b98bf0

Browse files
author
CyberReady
committed
Enhance CI workflow: integrate Docker Buildx, GHCR login, and build/push steps; add docker-compose file for service configuration
1 parent 75e9d0e commit 6b98bf0

3 files changed

Lines changed: 45 additions & 19 deletions

File tree

.github/workflows/build.yml

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,29 @@ on:
99
jobs:
1010
build:
1111
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
packages: write
1215

1316
steps:
1417
- uses: actions/checkout@v4
1518

16-
- name: Docker build
17-
run: docker build -t moveit:ci .
19+
- name: Set up Docker Buildx
20+
uses: docker/setup-buildx-action@v3
21+
22+
- name: Log in to GHCR
23+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
24+
uses: docker/login-action@v3
25+
with:
26+
registry: ghcr.io
27+
username: ${{ github.actor }}
28+
password: ${{ secrets.GITHUB_TOKEN }}
29+
30+
- name: Build and push
31+
uses: docker/build-push-action@v6
32+
with:
33+
context: .
34+
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
35+
tags: |
36+
ghcr.io/andrescyberready/moveit:latest
37+
ghcr.io/andrescyberready/moveit:${{ github.sha }}
Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
// <auto-generated/>
2-
global using Microsoft.AspNetCore.Builder;
3-
global using Microsoft.AspNetCore.Hosting;
4-
global using Microsoft.AspNetCore.Http;
5-
global using Microsoft.AspNetCore.Routing;
6-
global using Microsoft.Extensions.Configuration;
7-
global using Microsoft.Extensions.DependencyInjection;
8-
global using Microsoft.Extensions.Hosting;
9-
global using Microsoft.Extensions.Logging;
10-
global using Microsoft.Extensions.Validation.Embedded;
11-
global using System;
12-
global using System.Collections.Generic;
13-
global using System.IO;
14-
global using System.Linq;
15-
global using System.Net.Http;
16-
global using System.Net.Http.Json;
17-
global using System.Threading;
18-
global using System.Threading.Tasks;
2+
global using global::Microsoft.AspNetCore.Builder;
3+
global using global::Microsoft.AspNetCore.Hosting;
4+
global using global::Microsoft.AspNetCore.Http;
5+
global using global::Microsoft.AspNetCore.Routing;
6+
global using global::Microsoft.Extensions.Configuration;
7+
global using global::Microsoft.Extensions.DependencyInjection;
8+
global using global::Microsoft.Extensions.Hosting;
9+
global using global::Microsoft.Extensions.Logging;
10+
global using global::System;
11+
global using global::System.Collections.Generic;
12+
global using global::System.IO;
13+
global using global::System.Linq;
14+
global using global::System.Net.Http;
15+
global using global::System.Net.Http.Json;
16+
global using global::System.Threading;
17+
global using global::System.Threading.Tasks;

docker-compose.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
services:
2+
moveit:
3+
image: ghcr.io/andrescyberready/moveit:latest
4+
container_name: moveit
5+
ports:
6+
- "8080:8080"
7+
restart: unless-stopped

0 commit comments

Comments
 (0)