-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (34 loc) · 1.15 KB
/
docker-push.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Docker Build and Push
on:
push:
branches:
- main
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
with:
install: true
- name: Enable Docker Insecure Registry
run: |
sudo mkdir -p /etc/docker
echo '{"insecure-registries": ["${{ secrets.K8S_DOCKER_REGISTHOST }}"], "max-concurrent-uploads": 1, "debug": true}' | sudo tee /etc/docker/daemon.json
sudo systemctl restart docker
sudo systemctl status docker
docker info
docker image ls
shell: bash
- name: Check Docker status
run: |
export DOCKER_CLIENT_TIMEOUT=9000
export COMPOSE_HTTP_TIMEOUT=120
sudo systemctl status docker.service
sudo journalctl -xeu docker.service
- name: Build Docker image
run: docker build -t ${{ secrets.K8S_DOCKER_REGISTHOST }}/mediawiki:latest .
- name: Push Docker image
run: docker push ${{ secrets.K8S_DOCKER_REGISTHOST }}/mediawiki:latest