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.

34 lines
894 B

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