composerを消す #5
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Build and Push | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Extract tag name | |
run: | | |
tagname=${GITHUB_REF#refs/*/} && echo "TAG_NAME=${tagname#v}" >> $GITHUB_ENV | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: enable | |
run: | | |
SW_JSON="" | |
SW_JSON="$(sudo cat /etc/docker/daemon.json | jq '.+{ "insecure-registries":["${{ secrets.K8S_DOCKER_REGISTHOST }}"] }')" | |
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 | |
- name: Insecure Setting | |
run: | | |
export DOCKER_CLIENT_TIMEOUT=120 | |
export COMPOSE_HTTP_TIMEOUT=120 | |
sudo systemctl daemon-reload | |
sudo systemctl restart docker | |
- name: Build Docker image | |
run: docker build -t ${{ secrets.K8S_DOCKER_REGISTHOST }}/mediawiki:${{ env.TAG_NAME }} . | |
- name: Push Docker image | |
run: docker push ${{ secrets.K8S_DOCKER_REGISTHOST }}/mediawiki:${{ env.TAG_NAME }} |