Create CI.
This commit is contained in:
parent
37c10f86ce
commit
1d3592a72d
25
.github/workflows/docker-image.yml
vendored
Normal file
25
.github/workflows/docker-image.yml
vendored
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
name: Docker Image CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ "main" ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Write .env file
|
||||||
|
run: echo "${{secrets.FRONTEND_DOT_ENV}}" > ./frontend/.env
|
||||||
|
- name: Login Dockerhub
|
||||||
|
env:
|
||||||
|
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}}
|
||||||
|
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
|
||||||
|
run: echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin
|
||||||
|
- name: Build the Docker image
|
||||||
|
run: docker build -t jamesmurdza/sandbox .
|
||||||
|
- name: Push to Dockerhub
|
||||||
|
run: docker push jamesmurdza/sandbox:latest
|
Loading…
x
Reference in New Issue
Block a user