Skip to content

Merge pull request #20 from deckhouse/disable-root-reservation #68

Merge pull request #20 from deckhouse/disable-root-reservation

Merge pull request #20 from deckhouse/disable-root-reservation #68

Workflow file for this run

name: CI
on:
push:
tags:
- v*
branches:
- master
pull_request:
branches:
- master
env:
REGISTRY: registry-write.deckhouse.io
IMAGE_NAME: yandex-csi-driver/yandex-csi-driver
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.5.2
# https://github.com/golangci/golangci-lint-action
- name: golangci-lint
uses: golangci/golangci-lint-action@v3.4.0
with:
version: v1.55.2
args: --timeout=5m
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3.5.2
# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@v2.1.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.DECKHOUSE_REGISTRY_USER }}
password: ${{ secrets.DECKHOUSE_REGISTRY_PASSWORD }}
# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v4.4.0
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
uses: docker/build-push-action@v4.0.0
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}