Skip to content

Commit

Permalink
updated nighly docker build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Toni Moreno Gimenez committed Mar 24, 2021
1 parent dcd8214 commit 3d2a8c8
Showing 1 changed file with 13 additions and 35 deletions.
48 changes: 13 additions & 35 deletions .github/workflows/nightly-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

0 comments on commit 3d2a8c8

Please sign in to comment.