From a739335b7726bc0e4719092b2ee1e09392bafdf8 Mon Sep 17 00:00:00 2001 From: orhun Date: Tue, 27 Jul 2021 13:47:34 +0300 Subject: [PATCH] chore(docker): add docker build workflow --- .github/workflows/docker.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/docker.yml diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000..972595e --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,30 @@ +name: Docker Automated Builds + +on: + push: + branches: + - master + +jobs: + docker: + name: Docker + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@master + - name: Build + run: docker build -t rustypaste . + - name: Tag + run: | + docker tag rustypaste orhunp/rustypaste:latest + docker tag rustypaste docker.pkg.github.com/orhun/rustypaste/rustypaste:latest + - name: Login (Docker Hub) + run: echo ${{ secrets.DOCKER_TOKEN }} | + docker login -u orhunp --password-stdin + - name: Push (Docker Hub) + run: docker push orhunp/rustypaste:latest + - name: Login (Package Registry) + run: echo ${{ secrets.GITHUB_TOKEN }} | + docker login -u orhun docker.pkg.github.com --password-stdin + - name: Push (Package Registry) + run: docker push docker.pkg.github.com/orhun/rustypaste/rustypaste:latest