add build release #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: Build and Push Docker Image | |
on: | |
push: | |
branches: | |
- main # Измените на вашу основную ветку, если она называется иначе | |
# Вы также можете использовать pull_request или другие события, если хотите | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Log in to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build Docker image | |
run: docker build . -t ghcr.io/yurvon-screamo/redfish-mockup-server:latest | |
- name: Push Docker image | |
run: docker push ghcr.io/yurvon-screamo/redfish-mockup-server:latest |