Add origin #1
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: ci | ||
# You need to setup the following secrets: | ||
# CLOUDFLARE_ACCOUNT_ID: Your Cloudflare account ID | ||
# CLOUDFLARE_API_TOKEN: Your API Token generated | ||
# on: workflow_dispatch | ||
# In a real-world scenario you may want to trigger the workflow when pushing on your production branch | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
phoenix: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install Dependencies | ||
run: | | ||
make install_ci | ||
- name: Run Tests | ||
run: | | ||
make test | ||
- name: Deploy | ||
env: | ||
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | ||
run: | | ||
make deploy | ||
origin: | ||
runs-on: ubuntu-latest | ||
# important to be able to push to ghcr.io | ||
permissions: | ||
contents: read | ||
packages: write | ||
working-directory: ./origin | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Build Docker images | ||
run: | | ||
make docker_build | ||
# secrets.GITHUB_TOKEN is automatically injected | ||
- name: Login to container registry | ||
run: | | ||
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin | ||
- name: Push Docker images | ||
run: | | ||
make docker_push |