From 3d2a8c82b8cc1bfebddb37d9597da3f30a4774e9 Mon Sep 17 00:00:00 2001 From: Toni Moreno Gimenez Date: Wed, 24 Mar 2021 22:47:45 +0100 Subject: [PATCH] updated nighly docker build workflow --- .github/workflows/nightly-docker-image.yml | 48 ++++++---------------- 1 file changed, 13 insertions(+), 35 deletions(-) diff --git a/.github/workflows/nightly-docker-image.yml b/.github/workflows/nightly-docker-image.yml index c0bbd0d..eccd036 100644 --- a/.github/workflows/nightly-docker-image.yml +++ b/.github/workflows/nightly-docker-image.yml @@ -14,39 +14,17 @@ jobs: runs-on: ubuntu-latest steps: - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Cache Docker layers - uses: actions/cache@v2 + - uses: actions/checkout@v2 + name: Check out code + + - run: sudo apt-get install bash + + - uses: mr-smithers-excellent/docker-build-push@v5 + name: Build & push Docker image with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx-${{ github.sha }} - - - name: Login to Docker Hub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKER_HUB_USERNAME }} - password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - - - name: Checkout - uses: actions/checkout@v2 - - - name: Build and push - id: docker_build - uses: docker/build-push-action@v2 - with: - context: ./ - file: ./Dockerfile - builder: ${{ steps.buildx.outputs.name }} - push: true - tags: tonimoreno/snmpcollector:nightly - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Image digest - run: echo ${{ steps.docker_build.outputs.digest }} + image: tonimoreno/snmpcollector + tags: nightly + registry: docker.io + dockerfile: Dockerfile + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} \ No newline at end of file