You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
873 B

  1. name: Build container image
  2. on:
  3. push:
  4. branches:
  5. - "main"
  6. tags:
  7. - "*"
  8. jobs:
  9. build-image:
  10. runs-on: ubuntu-latest
  11. steps:
  12. - uses: actions/checkout@v2
  13. - uses: docker/setup-buildx-action@v1
  14. - uses: docker/login-action@v1
  15. with:
  16. username: ${{ secrets.DOCKERHUB_USERNAME }}
  17. password: ${{ secrets.DOCKERHUB_TOKEN }}
  18. - uses: docker/metadata-action@v3
  19. id: meta
  20. with:
  21. images: tootsuite/mastodon
  22. flavor: |
  23. latest=auto
  24. tags: |
  25. type=edge,branch=main
  26. type=semver,pattern={{ raw }}
  27. - uses: docker/build-push-action@v2
  28. with:
  29. context: .
  30. push: true
  31. tags: ${{ steps.meta.outputs.tags }}
  32. cache-from: type=registry,ref=tootsuite/mastodon:latest
  33. cache-to: type=inline