Skip to content

integration testing with mergify #69

integration testing with mergify

integration testing with mergify #69

Workflow file for this run

name: Docker Image CI
on:
pull_request:
types:
- synchronize
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Build the Docker image
run: |
docker build . --file ./Dockerfile --tag ghcr.io/eol-uchile/docs-eol:${GITHUB_SHA}
docker login ghcr.io -u eolito -p ${{ secrets.CR_PAT }}
docker push ghcr.io/eol-uchile/docs-eol:${GITHUB_SHA}
- name: Create or update PR to main
if: github.ref != 'refs/heads/main'
run: |
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
git checkout -b update-image-${GITHUB_SHA}
git add .
# Verificar si hay cambios para evitar PRs vacíos
if ! git diff-index --quiet HEAD --; then
git commit -m "Update Docker image"
git push origin update-image-${GITHUB_SHA}
else
echo "No changes to commit or push."
fi