Merge pull request #2 from cloudsteak/Init #2
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: Kód2 (python-flask-app-02) - Épít és feltölt | |
# Kód4 példához - Épít és feltölt Docker image-t Azure Container Registry-be | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "Kod2/02/**" | |
pull_request: | |
branches: | |
- release-* | |
paths: | |
- "Kod2/02/**" | |
env: | |
APP_NAME: python-flask-app-02 # Alkalmazás képfájl neve | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Kód letöltése | |
uses: actions/checkout@v4 | |
- name: ACR bejelentkezés | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ secrets.ACR_LOGIN_SERVER }} | |
username: ${{ secrets.ACR_USERNAME }} | |
password: ${{ secrets.ACR_PASSWORD }} | |
- name: Extract Docker metadata | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ${{ secrets.ACR_LOGIN_SERVER }}/${{ env.APP_NAME }} | |
tags: | | |
type=sha | |
type=raw,value=latest | |
type=semver,pattern={{version}},event=tag | |
- name: Épít és feltölt | |
uses: docker/build-push-action@v5 | |
with: | |
context: ./Kod2/02 | |
file: ./Kod2/02/Dockerfile | |
push: true | |
platforms: linux/amd64 | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
- name: ACR kijelentkezés | |
run: docker logout ${{ secrets.ACR_LOGIN_SERVER }} |