build-docker-image.yaml 758 B

123456789101112131415161718192021222324
  1. name: build-docker-image
  2. on:
  3. push:
  4. branches: [develop]
  5. jobs:
  6. build-docker-image:
  7. runs-on: ubuntu-latest
  8. env:
  9. DOCKER_GITHUB_REPOSITORY: "zammad-docker"
  10. DOCKER_IMAGES: "zammad"
  11. DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
  12. DOCKER_REPOSITORY: "zammad"
  13. DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
  14. steps:
  15. - name: Extract REPO_USER from GITHUB_REPOSITORY ENV
  16. run: echo "REPO_USER=$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $1}')" >> $GITHUB_ENV
  17. - name: Checkout code
  18. uses: actions/checkout@master
  19. - name: Fetch all history for all tags and branches
  20. run: git fetch --prune --unshallow
  21. - name: Build docker image
  22. run: .github/docker-image-build.sh