From c698f019ade9d966b4dd45612ac97c61bb7142d4 Mon Sep 17 00:00:00 2001 From: thebeanogamer Date: Tue, 8 Feb 2022 20:22:21 +0000 Subject: [PATCH] And this CI job --- .github/workflows/build-dockerfile.yml | 37 +++++++++++++------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build-dockerfile.yml b/.github/workflows/build-dockerfile.yml index b1d1907a..b48f6e3d 100644 --- a/.github/workflows/build-dockerfile.yml +++ b/.github/workflows/build-dockerfile.yml @@ -6,27 +6,26 @@ jobs: build: runs-on: ubuntu-latest steps: - - name: Checkout repository - uses: actions/checkout@v2 + - name: Checkout repository + uses: actions/checkout@v2 + with: + submodules: true - - name: Checkout submodules - uses: textbook/git-checkout-submodule-action@master + - name: Build Docker container + run: docker build -t ractf/shell:latest -t ghcr.io/ractf/shell:latest . - - name: Build Docker container - run: docker build -t ractf/shell:latest -t ghcr.io/ractf/shell:latest . + - name: Login to Docker Hub + if: github.ref == 'refs/heads/master' + run: docker login --username ractf --password ${{ secrets.password }} - - name: Login to Docker Hub - if: github.ref == 'refs/heads/master' - run: docker login --username ractf --password ${{ secrets.password }} + - name: Login to Github Container Registry + if: github.ref == 'refs/heads/master' + run: echo ${{ secrets.ghtoken }} | docker login ghcr.io -u ${{ secrets.ghuser }} --password-stdin - - name: Login to Github Container Registry - if: github.ref == 'refs/heads/master' - run: echo ${{ secrets.ghtoken }} | docker login ghcr.io -u ${{ secrets.ghuser }} --password-stdin + - name: Push to Docker Hub + if: github.ref == 'refs/heads/master' + run: docker push ractf/shell:latest - - name: Push to Docker Hub - if: github.ref == 'refs/heads/master' - run: docker push ractf/shell:latest - - - name: Push to Github Container Registry - if: github.ref == 'refs/heads/master' - run: docker push ghcr.io/ractf/shell:latest + - name: Push to Github Container Registry + if: github.ref == 'refs/heads/master' + run: docker push ghcr.io/ractf/shell:latest