docker-update.yml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. # This workflow updates the docker container which has context and
  2. # pandoc installed, and on which the resume documents are built. The
  3. # workflow runs whenever the dockerfile is changed, and updates the
  4. # container image in the Github Packages registry.
  5. name: Publish Docker Image
  6. # Controls when the action will run.
  7. on:
  8. # Triggers the workflow on push events but only for the master branch
  9. push:
  10. branches: [ master ]
  11. # Allows you to run this workflow manually from the Actions tab
  12. workflow_dispatch:
  13. # A workflow run is made up of one or more jobs that can run sequentially or in parallel
  14. jobs:
  15. # This workflow contains a single job which does both the building and the pushing
  16. push-to-registry:
  17. name: Build and Push resume builder docker image
  18. # The type of runner that the job will run on
  19. runs-on: ubuntu-latest
  20. permissions:
  21. packages: write
  22. contents: read
  23. steps:
  24. # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
  25. - name: Check out the repo
  26. uses: actions/checkout@v2
  27. - name: Build and push Docker images to Github Packages
  28. uses: docker/build-push-action@v2.4.0
  29. with:
  30. file: .docker/resume.dockerfile
  31. username: ${{ github.actor }}
  32. password: ${{ secrets.GITHUB_TOKEN }}
  33. registry: docker.pkg.github.com
  34. repository: mszep/pandoc_resume/resume_builder
  35. tag_with_ref: true