Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

ci(deps): bump docker/setup-buildx-action from 2.6.0 to 3.1.0 #787

ci(deps): bump docker/setup-buildx-action from 2.6.0 to 3.1.0

ci(deps): bump docker/setup-buildx-action from 2.6.0 to 3.1.0 #787

Workflow file for this run

name: CI & CD
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
integration:
name: CI
runs-on: ubuntu-20.04
continue-on-error: false
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
cache: npm
- name: Run lint, build and unit test
run: |
npm ci
npm run lint
npm run build
npm run test
- name: Start Streamr Docker Stack
uses: streamr-dev/streamr-docker-dev-action@v1.0.1
with:
services-to-start: 'parity-sidechain-node0 parity-node0 core-api nginx'
- name: Integration Test
env:
DEBUG: '*'
TEST_TIMEOUT: '600000'
NODE_ENV: 'development'
run: npm run integration-test
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.1.0
- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Build
uses: docker/build-push-action@v4.0.0
with:
context: .
file: ./Dockerfile
platforms: linux/amd64
push: false
load: true
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
delivery:
name: CD
if: github.event_name != 'pull_request'
needs:
- integration
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.1.0
id: buildx
with:
driver-opts: |
network=host
- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Docker meta
id: docker_meta
uses: docker/metadata-action@v4.6.0
with:
images: streamr/ethereum-watcher
tags: |
type=schedule
type=semver,pattern={{version}}
type=semver,pattern=v{{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=ref,event=branch
type=ref,event=pr
type=sha
type=raw,value=dev
flavor: |
latest=auto
- name: Login to Docker Hub Container Registry
uses: docker/login-action@v2.2.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push container to Docker Hub
uses: docker/build-push-action@v4.0.0
with:
context: .
file: ./Dockerfile
platforms: linux/amd64
push: true
load: false
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
builder: ${{ steps.buildx.outputs.name }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache