Skip to content

Add command to create the .cfg file #7

Add command to create the .cfg file

Add command to create the .cfg file #7

Workflow file for this run

name: Build, Push and Deploy a Docker Image
on:
push:
branches: [main]
workflow_dispatch: # Allows for manual triggering
permissions:
contents: read
packages: write
jobs:
build-push-deploy-image:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Create .cfg file
run: |
touch application.cfg
echo "${{secrets.ENV_CONTENT}}" >> application.cfg
- name: Log in to the Container registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
id: push
uses: docker/build-push-action@v6
with:
context: ./MavenBack
push: true
tags: |
ghcr.io/aleef02/pingpongpage:latest