mirror of
https://github.com/imgfloat/server.git
synced 2026-11-05 06:44:08 +00:00
Add docker build/push
This commit is contained in:
1 parent
033498f630
commit
647b87a820
1 file changed
+25
@@ -17,3 +17,28 @@ jobs:
|
||||
cache: maven
|
||||
- name: Build and test
|
||||
run: mvn -B verify
|
||||
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: kruhlmann
|
||||
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||
tags: |
|
||||
kruhlmann/imgfloat-j:latest
|
||||
kruhlmann/imgfloat-j:${{ github.sha }}
|
||||
Reference in new issue
Block a user