Using Docker Compose with GitHub Actions
If your code base is hosted on GitHub, it is highly like that you are aware of GitHub Actions. GitHub Actions is the CI/CD platform provided by GitHub. By using GitHub Actions, we can add workflows that build and test our code base. This can be adapted for each branch and pull request or be used to add custom workflows and deploy our code base through GitHub.
Creating your first GitHub Action
In order to add a GitHub workflow, you need to place YAML files along with workflow instructions inside the .github/workflows
directory. Multiple files can be added, and they should be executed by GitHub independently.
For now, we will focus our app to execute on the main branch.
This is the base of our workflow:
name: subscription-service on: push: branches: - main jobs: build: timeout-minutes: 10 runs-on: ubuntu-latest...