| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- name: Docker Build & Push For Testing
- on:
- workflow_dispatch:
- inputs:
- tag:
- description: "Тег Docker Image"
- required: true
- default: "testing"
- permissions:
- packages: write
- contents: write
- env:
- REPOSITORY: ${{ github.repository }}
- jobs:
- setup:
- name: Setup
- runs-on: ubuntu-latest
- outputs:
- repository: ${{ steps.vars.outputs.GITHUB_PROJECT_NAME }}
- steps:
- - name: Set lowercase repository
- id: vars
- run: echo "GITHUB_PROJECT_NAME=$(echo '${{ env.REPOSITORY }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT
- build:
- name: Build Images
- runs-on: ubuntu-latest
- needs: setup
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- - name: Setup Taskfile
- uses: pnorton5432/setup-task@v1
- with:
- task-version: 3.40.1
- - 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 And Push Docker images
- run: task build-and-push-production-${{ github.event.inputs.tag }}
- env:
- GITHUB_PROJECT_NAME: ${{ needs.setup.outputs.repository }}
|