This repository has been archived by the owner on Jul 21, 2024. It is now read-only.
Modified settings to work with heroku #19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Build and Push | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- v* | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Setup Chrome | |
uses: nanasess/setup-chromedriver@v2 | |
- name: Install dependencies | |
run: python -m pip install -r requirements.txt | |
- name: Test build | |
run: python manage.py test | |
build-and-push: | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Build & push Docker image | |
uses: mr-smithers-excellent/docker-build-push@v6 | |
with: | |
image: c4thebomb/csmb-housewars | |
registry: docker.io | |
addLatest: true | |
multiPlatform: true | |
platform: linux/amd64,linux/arm64/v8 | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
draft: | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Draft release | |
uses: release-drafter/release-drafter@v5 | |
id: release-draft | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |