Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker build and push on github actions #172

Open
wants to merge 12 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
README.md
.dockerignore
Dockerfile
LICENSE
README.md
docker-compose.yml
todo
setup.cfg
35 changes: 35 additions & 0 deletions .github/workflows/docker_push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# This is a basic workflow to help you get started with Actions

name: docker_push

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the develop branch
push:
branches: [ develop, master ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: Get version string
run: git describe --tags >> ${GITHUB_WORKSPACE}/src/esportsbot/version.txt

- name: Build docker image
run: docker build -t fragsoc/esports-bot:${GITHUB_REF} ${GITHUB_WORKSPACE}

- name: Push to docker hub
run: |
echo ${DOCKER_PASSWORD} | docker login -u ${DOCKER_USERNAME} --password-stdin
docker push fragsoc/esports-bot:${GITHUB_REF}
33 changes: 0 additions & 33 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# UoY Esports Bot Rewrite
<div align=left>
<a href="https://travis-ci.com/FragSoc/esports-bot"><img src="https://img.shields.io/travis/com/fragsoc/esports-bot?style=flat-square" /></a>
<a href="https://github.com/FragSoc/esports-bot/actions"><img src="https://img.shields.io/github/workflow/status/FragSoc/esports-bot/docker_push/develop?style=flat-square" /></a>
<a href="https://hub.docker.com/r/fragsoc/esports-bot"><img src="https://img.shields.io/docker/pulls/fragsoc/esports-bot?style=flat-square" /></a>
<a href="https://github.com/FragSoc/esports-bot"><img src="https://img.shields.io/github/license/fragsoc/esports-bot?style=flat-square" /></a>
</div>
Expand Down
5 changes: 0 additions & 5 deletions docker-push.sh

This file was deleted.