chore: cargo fmt + clippy front #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: 'Release' | |
on: | |
push: | |
branches: | |
- "master" | |
env: | |
front_image_name: ${{ secrets.REGISTRY_NAME }}/peto-main-front | |
api_image_name: ${{ secrets.REGISTRY_NAME }}/peto-main-api | |
jobs: | |
push-to-registry: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
# build and push containers | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Azure container registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ secrets.REGISTRY_NAME }} | |
username: ${{ secrets.REGISTRY_USERNAME }} | |
password: ${{ secrets.REGISTRY_PASSWORD }} | |
# front | |
- name: Extract metadata (tags, labels) for front | |
id: meta-front | |
uses: docker/metadata-action@v4 | |
with: | |
images: ${{ env.front_image_name }} | |
- name: Build and push front | |
uses: docker/build-push-action@v4 | |
with: | |
context: ./front | |
push: true | |
tags: ${{ steps.meta-front.outputs.tags }} | |
labels: ${{ steps.meta-front.outputs.labels }} | |
# api | |
- name: Extract metadata (tags, labels) for api | |
id: meta-api | |
uses: docker/metadata-action@v4 | |
with: | |
images: ${{ env.api_image_name }} | |
- name: Build and push api | |
uses: docker/build-push-action@v4 | |
with: | |
context: ./api | |
push: true | |
tags: ${{ steps.meta-api.outputs.tags }} | |
labels: ${{ steps.meta-api.outputs.labels }} |