Skip to content

Commit

Permalink
fix: configの順序ミス
Browse files Browse the repository at this point in the history
  • Loading branch information
yuito-it committed Aug 1, 2024
1 parent 3ed0fbd commit bd5650c
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 44 deletions.
37 changes: 15 additions & 22 deletions .github/workflows/docker-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,6 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Enable Docker configuration
run: |
SW_JSON=""
SW_JSON="$(sudo cat /etc/docker/daemon.json | jq '.+{ "insecure-registries":["${{ secrets.K8S_DOCKER_REGISTHOST }}"],"max-concurrent-uploads": 1,"debug":true }')"
echo "${SW_JSON}" | sudo bash -c 'cat -- > /etc/docker/daemon.json'
sudo cat /etc/docker/daemon.json
sudo systemctl restart docker || sudo journalctl -xeu docker.service
echo ---
docker info
echo ---
docker image ls
echo ---
sudo systemctl status docker
shell: bash

- name: Check Docker status
run: |
export DOCKER_CLIENT_TIMEOUT=18000
export COMPOSE_HTTP_TIMEOUT=240
sudo systemctl status docker.service
sudo journalctl -xeu docker.service
- name: Build Docker image
run: docker build -t ${{ secrets.K8S_DOCKER_REGISTHOST }}/mediawiki:latest .
id: build
Expand Down Expand Up @@ -65,5 +43,20 @@ jobs:
- name: Load Docker image from file
run: docker load -i mediawiki_latest.tar

- name: Set Docker configuration
run: |
SW_JSON=""
SW_JSON="$(sudo cat /etc/docker/daemon.json | jq '.+{ "insecure-registries":["${{ secrets.K8S_DOCKER_REGISTHOST }}"],"max-concurrent-uploads": 1,"debug":true }')"
echo "${SW_JSON}" | sudo bash -c 'cat -- > /etc/docker/daemon.json'
sudo cat /etc/docker/daemon.json
sudo systemctl restart docker || sudo journalctl -xeu docker.service
echo ---
docker info
echo ---
docker image ls
echo ---
sudo systemctl status docker
shell: bash

- name: Push Docker image
run: docker push ${{ secrets.K8S_DOCKER_REGISTHOST }}/mediawiki:latest
37 changes: 15 additions & 22 deletions .github/workflows/docker-tag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,6 @@ jobs:
run: |
tagname=${GITHUB_REF#refs/*/} && echo "TAG_NAME=${tagname#v}" >> $GITHUB_ENV
- name: Enable Docker configuration
run: |
SW_JSON=""
SW_JSON="$(sudo cat /etc/docker/daemon.json | jq '.+{ "insecure-registries":["${{ secrets.K8S_DOCKER_REGISTHOST }}"],"max-concurrent-uploads": 1,"debug":true }')"
echo "${SW_JSON}" | sudo bash -c 'cat -- > /etc/docker/daemon.json'
sudo cat /etc/docker/daemon.json
sudo systemctl restart docker || sudo journalctl -xeu docker.service
echo ---
docker info
echo ---
docker image ls
echo ---
sudo systemctl status docker
shell: bash

- name: Check Docker status
run: |
export DOCKER_CLIENT_TIMEOUT=18000
export COMPOSE_HTTP_TIMEOUT=240
sudo systemctl status docker.service
sudo journalctl -xeu docker.service
- name: Build Docker image
run: docker build -t ${{ secrets.K8S_DOCKER_REGISTHOST }}/mediawiki:${{ env.TAG_NAME }} .
id: build
Expand Down Expand Up @@ -69,5 +47,20 @@ jobs:
- name: Load Docker image from file
run: docker load -i mediawiki_latest.tar

- name: Set Docker configuration
run: |
SW_JSON=""
SW_JSON="$(sudo cat /etc/docker/daemon.json | jq '.+{ "insecure-registries":["${{ secrets.K8S_DOCKER_REGISTHOST }}"],"max-concurrent-uploads": 1,"debug":true }')"
echo "${SW_JSON}" | sudo bash -c 'cat -- > /etc/docker/daemon.json'
sudo cat /etc/docker/daemon.json
sudo systemctl restart docker || sudo journalctl -xeu docker.service
echo ---
docker info
echo ---
docker image ls
echo ---
sudo systemctl status docker
shell: bash

- name: Push Docker image
run: docker push ${{ secrets.K8S_DOCKER_REGISTHOST }}/mediawiki:${{ env.TAG_NAME }}

0 comments on commit bd5650c

Please sign in to comment.