Skip to content

Commit 062ebe6

Browse files
authored
Create docker-publish.yml
1 parent 8a18964 commit 062ebe6

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Docker Publish
2+
3+
on:
4+
schedule:
5+
- cron: '36 4 * * *'
6+
push:
7+
branches: [ main ]
8+
pull_request:
9+
branches: [ main ]
10+
11+
jobs:
12+
build:
13+
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v3
19+
- name: Docker Login
20+
env:
21+
DOCKER_USER: ${{secrets.DOCKER_USER}}
22+
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
23+
run: docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
24+
- name: Copy .env.sample to .env
25+
run: cp .env.sample .env
26+
- name: For phplatest
27+
run: docker-compose -f docker-compose-publish.yml build && docker-compose -f docker-compose-publish.yml push
28+
- name: For php8.0
29+
run: PHP_VERSION=8.0 docker-compose -f docker-compose-publish.yml build && PHP_VERSION=8.0 docker-compose -f docker-compose-publish.yml push

0 commit comments

Comments
 (0)