Skip to content

Commit adaaed7

Browse files
CI
1 parent 2c7d09e commit adaaed7

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/build.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Build and push Docker images
2+
on:
3+
push:
4+
tags:
5+
- v*
6+
workflow_dispatch:
7+
8+
env:
9+
REGISTRY: ghcr.io
10+
11+
jobs:
12+
server:
13+
runs-on: ubuntu-latest
14+
permissions: write-all
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v3
18+
- name: Set up Docker Buildx
19+
uses: docker/setup-buildx-action@v3
20+
with:
21+
driver: docker
22+
- name: Login to GitHub Container Registry
23+
uses: docker/login-action@v3
24+
with:
25+
registry: ${{ env.REGISTRY }}
26+
username: "motortruck1221"
27+
password: ${{ secrets.GITHUB_TOKEN }}
28+
- name: Extract Docker Metadata
29+
id: meta
30+
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
31+
with:
32+
images: ${{ env.REGISTRY }}/ruby-network/corlink-server
33+
- name: Build and push Docker image
34+
id: docker_build
35+
uses: docker/build-push-action@v3
36+
with:
37+
context: .
38+
file: ./Dockerfile
39+
push: true
40+
labels: ${{ steps.meta.outputs.labels }}
41+
tags: ${{ env.REGISTRY }}/ruby-network/assets-server:latest, ${{ env.REGISTRY }}/ruby-network/assets-server:${{ github.sha }}

0 commit comments

Comments
 (0)