diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..5f70e6b --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,26 @@ +name: push image + +on: + push: + branches: + - 'master' + +env: + REGISTRY: contabo-reg.kuroneko6423.com + IMAGE_NAME: webp-convert + +jobs: + docker: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - uses: docker/setup-buildx-action@v3 + - name: Log in to the Container registry + run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login ${{ env.REGISTRY }} -u ${{ secrets.DOCKER_USERNAME }} --password-stdin + - name: Build and push + run: | + docker build . -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}