Skip to content

1260-sort-columns-by-header-on-users-table (#1263) #20

1260-sort-columns-by-header-on-users-table (#1263)

1260-sort-columns-by-header-on-users-table (#1263) #20

name: build_web_usuaris
on:
push:
branches:
- main
paths:
- "web/usuaris/**"
jobs:
build_web_usuaris:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "18"
- name: Grab version
id: version
run: echo "::set-output name=version::$(jq -r '.version' web/usuaris/package.json)"
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: web/usuaris
push: true
tags: itacademybcn/ita-usuaris-web:v${{ steps.version.outputs.version }}
- name: Update version
run: |
git config --global user.name "ITA Wiki bot"
git config --global user.email "bot@itawiki.com"
version=$(grep version: ./config/dev/web_usuaris.yml | awk '{print $2}')
sed -i "s/version: $version/version: ${{ steps.version.outputs.version }}/" ./config/dev/web_usuaris.yml
git add ./config/dev/web_usuaris.yml
git commit -m "Bump web_usuaris image to v${{ steps.version.outputs.version }}"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
title: "Bump web_usuaris image version to v${{ steps.version.outputs.version }}"
commit-message: "Bump web_usuaris image version to v${{ steps.version.outputs.version }}"
branch: "bump-web_usuaris-to-v${{ steps.version.outputs.version }}"
delete-branch: true
token: ${{ secrets.GITHUB_TOKEN }}
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
assignees: ${{ github.actor }}