Skip to content

Merge pull request #131 from imba28/feat/highlight_search_result #11

Merge pull request #131 from imba28/feat/highlight_search_result

Merge pull request #131 from imba28/feat/highlight_search_result #11

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
env:
go_version: 1.18
node_version: 14
jobs:
docker-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Docker meta
id: meta
uses: crazy-max/ghaction-docker-meta@v4
with:
images: imba28/spolyr
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}.{{minor}}.{{patch}}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v3
with:
push: true
context: .
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
BUILD_NUMBER=${{ steps.meta.outputs.version }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
artifacts:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Get current tag
id: get_version
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | tail -c 6)
- uses: actions/setup-node@v3
with:
node-version: ${{ env.node_version }}
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.go_version }}
- run: make openapi-spec
- run: |
sed -i "s/dev-build/${{ steps.get_version.outputs.VERSION }}/" assets/App.vue
make bundle
- name: Copy docker-compose.yml
run: |
cp docker-compose.yml dist &&
sed -i "s/imba28\/spolyr/imba28\/spolyr:${{ steps.get_version.outputs.VERSION }}/" dist/docker-compose.yml
- name: Upload artifacts
uses: softprops/action-gh-release@v1
with:
files: dist/**
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}