updated folder structure to simply discovery and contributions (#121) #1
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: Expense Service Build and Push to GHCR | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'python/expense-service/**' | |
workflow_dispatch: | |
env: | |
REGISTRY: ghcr.io | |
REPOSITORY: ${{ github.repository }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set short_sha | |
id: vars | |
run: echo "short_sha=$(git rev-parse --short HEAD)" >> ${GITHUB_ENV} | |
- name: Login to GHCR | |
uses: docker/login-action@v1 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: downcase env.REPOSITORY | |
run: | | |
echo "REPOSITORY=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v2 | |
with: | |
context: python/expense-service | |
push: true | |
tags: ${{ env.REGISTRY }}/${{ env.REPOSITORY }}/expense-service:${{ env.short_sha }} |