ci: Rework for woodpecker
This commit is contained in:
		
							
								
								
									
										40
									
								
								.drone.yml
									
									
									
									
									
								
							
							
						
						
									
										40
									
								
								.drone.yml
									
									
									
									
									
								
							@@ -1,40 +0,0 @@
 | 
			
		||||
---
 | 
			
		||||
kind: pipeline
 | 
			
		||||
type: docker
 | 
			
		||||
name: test
 | 
			
		||||
 | 
			
		||||
steps:
 | 
			
		||||
- name: test
 | 
			
		||||
  image: python:3.11
 | 
			
		||||
  commands: 
 | 
			
		||||
    - pip install poetry
 | 
			
		||||
    - poetry run pytest --cov-report term-missing --cov=fediverse_blocklist_deploy tests
 | 
			
		||||
---
 | 
			
		||||
kind: pipeline
 | 
			
		||||
type: exec
 | 
			
		||||
name: build
 | 
			
		||||
 | 
			
		||||
platform:
 | 
			
		||||
  os: linux
 | 
			
		||||
  arch: arm64
 | 
			
		||||
 | 
			
		||||
steps:
 | 
			
		||||
- name: build
 | 
			
		||||
  commands:
 | 
			
		||||
    - docker build -t gcrkrause/fediverse-blocklist-deploy .
 | 
			
		||||
- name: push
 | 
			
		||||
  environment:
 | 
			
		||||
    USERNAME:
 | 
			
		||||
      from_secret: docker-hub-user
 | 
			
		||||
    PASSWORD:
 | 
			
		||||
      from_secret: docker-hub-pw
 | 
			
		||||
  commands:
 | 
			
		||||
    - docker login -u $USERNAME -p $PASSWORD
 | 
			
		||||
    - docker push gcrkrause/fediverse-blocklist-deploy
 | 
			
		||||
    - docker image prune -a -f
 | 
			
		||||
  when:
 | 
			
		||||
    event:
 | 
			
		||||
      exclude:
 | 
			
		||||
      - pull_request
 | 
			
		||||
    branch: 
 | 
			
		||||
    - main
 | 
			
		||||
							
								
								
									
										14
									
								
								.woodpecker.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								.woodpecker.yml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,14 @@
 | 
			
		||||
steps:
 | 
			
		||||
  test:
 | 
			
		||||
    image: python:3.11
 | 
			
		||||
    commands:
 | 
			
		||||
      - pip install poetry
 | 
			
		||||
      - poetry run pytest --cov-report term-missing --cov=fediverse_blocklist_deploy tests
 | 
			
		||||
 | 
			
		||||
  create_docker_image:
 | 
			
		||||
    image: woodpeckerci/plugin-docker-buildx
 | 
			
		||||
    secrets: [ docker_username, docker_password ]
 | 
			
		||||
    settings:
 | 
			
		||||
      repo: moanos/fedivers-blocklist-tool
 | 
			
		||||
      dockerfile: Dockerfile
 | 
			
		||||
      tag: latest
 | 
			
		||||
		Reference in New Issue
	
	Block a user