From 09e0d7ac8a8b4aae0c8f64d2e87f45d495c7016c Mon Sep 17 00:00:00 2001 From: Joe Banks Date: Tue, 25 Aug 2020 13:24:23 +0100 Subject: GitHub Deployment action --- .github/workflows/deploy.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..36ad937 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,25 @@ +name: Deploy to production + +on: + push: + branches: + - master + +jobs: + push_docker_image: + name: Build & Publish Docker image + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Build Docker image + run: docker build . --file Dockerfile -t python-discord/metricity/metricity:${{ github.sha }} + + - name: Publish Docker image + uses: elgohr/Publish-Docker-Github-Action@master + with: + name: python-discord/metricity/metricity:${{ github.sha }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + registry: docker.pkg.github.com -- cgit v1.2.3