Skip to content

test trigger workflows #8

test trigger workflows

test trigger workflows #8

Workflow file for this run

name: CI User
on:
push:
branches:
- main
paths:
- 'cmd/user/**'
- 'internal/common/**'
- 'internal/models/**'
- 'internal/services/user/**'
- 'user.dockerfile'
- '!docker-compose.yml'
- '!assets/**'
- '!config/**'
- '!grafana/**'
- '!prometheus/**'
- '!README.md'
jobs:
build-images:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v5
with:
file: user.dockerfile
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/rvc-user:${{ github.sha }}
update-docker-compose:
runs-on: ubuntu-latest
needs: build-images
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Update Docker Compose
run: |
sed -i 's|docker.io/notmde/rvc-user.*|docker.io/notmde/rvc-user:${{ github.sha }}|g' docker-compose.yml
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git add docker-compose.yml
git commit -m "Update docker-compose.yml with ${{ github.sha }} image tag"
git push origin HEAD:refs/heads/update-docker-compose-for-user-service
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
title: Update Docker Compose with latest image tag
commit-message: Update Docker Compose with latest image tag
branch: update-docker-compose-for-user-service