Skip to content

Merge pull request #210 from leomoon/master #42

Merge pull request #210 from leomoon/master

Merge pull request #210 from leomoon/master #42

Workflow file for this run

name: Build and Deploy
on:
push:
branches:
- 'master'
paths:
- '.github/workflows/build.yml'
- 'VERSION'
jobs:
build:
name: Pipeline
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out the source code
uses: actions/checkout@v2
- name: Retrieve current version
run: |
VER=$(cat VERSION)
echo "VERSION=$VER" >> $GITHUB_ENV
- name: Add version Tag
uses: rickstaa/action-create-tag@v1
with:
tag: ${{ env.VERSION }}
tag_exists_error: false
force_push_tag: true
- name: Create Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.VERSION }}
release_name: Release ${{ env.VERSION }}
prerelease: false
draft: false
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
file: ./docker/production.dockerfile
platforms: linux/amd64,linux/arm64
tags: zavy86/wikidocs:latest
push: true