chore: Version 0.13.2 #6
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: Release version | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Read metadata | |
uses: docker/metadata-action@v5 | |
id: meta | |
with: | |
images: nioc/own-my-money | |
tags: | | |
type=semver,pattern={{version}} | |
flavor: | | |
latest=true | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js 20 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
cache: 'npm' | |
cache-dependency-path: 'money-front-vue/package-lock.json' | |
- name: Build front | |
run: cd money-front-vue && npm install && npm run build | |
- name: Create release archive | |
shell: bash | |
run: | | |
mkdir -p own-my-money/money-front-vue/dist && | |
cp -a money-front-vue/dist/ own-my-money/money-front-vue -r && | |
cp -a server/ own-my-money/ -r && | |
cp -a *.md own-my-money/ && | |
tar zcvf own-my-money-${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}.tar.gz own-my-money && | |
rm own-my-money -r | |
- name: Draft Github release with archive | |
uses: softprops/action-gh-release@v2 | |
with: | |
draft: true | |
files: own-my-money-${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}.tar.gz | |
body: | | |
### Features | |
### Bug fixes | |
### Technical | |
- name: Prepare docker build context | |
shell: bash | |
run: | | |
mkdir image-build && | |
cp -a money-front-vue/dist image-build/front -r && | |
cp -a server image-build/ -r && | |
cp -a docker image-build/ -r | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push docker multi architecture image | |
id: docker_build | |
uses: docker/build-push-action@v5 | |
with: | |
context: image-build | |
file: docker/Dockerfile-multiarch | |
push: true | |
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 | |
build-args: | | |
VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }} | |
GIT_COMMIT=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }} | |
BUILD_DATE=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }} | |
tags: ${{ steps.meta.outputs.tags }} |