Skip to content

Commit

Permalink
feat: workflow init
Browse files Browse the repository at this point in the history
  • Loading branch information
yuito-it committed Jul 26, 2024
1 parent c6f441f commit 5dde2c5
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/docker-tag.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
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: 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 }}

0 comments on commit 5dde2c5

Please sign in to comment.