Skip to content

Commit a1f4171

Browse files
committed
Add GitHub Actions workflow for building and pushing Biomimetic Docker image
1 parent 019dbdc commit a1f4171

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/biomim-build.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Build Biomimetic image
2+
on:
3+
workflow_dispatch:
4+
push:
5+
paths:
6+
- 'Dockerfile'
7+
- 'requirements.txt'
8+
- '.github/workflows/biomim-build.yml' # Self-trigger
9+
10+
env:
11+
REGISTRY: ghcr.io
12+
IMAGE_NAME: kutayeroglu/biomim
13+
VERSION: latest
14+
15+
jobs:
16+
build-and-push-image:
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: read
20+
packages: write
21+
22+
steps:
23+
- name: Delete huge unnecessary tools folder
24+
run: rm -rf /opt/hostedtoolcache
25+
26+
- name: Check disk space
27+
run: df -h
28+
29+
- name: Checkout repository
30+
uses: actions/checkout@v3
31+
32+
- name: Set up Docker Buildx
33+
uses: docker/setup-buildx-action@v2
34+
35+
- name: Log in to the registry
36+
uses: docker/login-action@v2
37+
with:
38+
registry: ${{ env.REGISTRY }}
39+
username: ${{ github.actor }}
40+
password: ${{ secrets.GITHUB_TOKEN }}
41+
42+
- name: Build and push image
43+
uses: docker/build-push-action@v4
44+
with:
45+
context: .
46+
build-args: |
47+
VERSION=${{ env.VERSION }}
48+
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }}
49+
push: true

0 commit comments

Comments
 (0)