Skip to content

Merge pull request #2439 from devops-infra/dependabot/pip/pip/aws/mas… #3418

Merge pull request #2439 from devops-infra/dependabot/pip/pip/aws/mas…

Merge pull request #2439 from devops-infra/dependabot/pip/pip/aws/mas… #3418

Workflow file for this run

name: Push to other branches
on:
push:
branches-ignore:
- master
jobs:
labels:
name: Repo labels
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Labels' config
shell: bash
run: |
mkdir -p .tmp
curl -LsS https://raw.githubusercontent.com/devops-infra/.github/master/.github/labels.yml -o .tmp/labels.yml
- name: Update labels (dry run)
uses: crazy-max/ghaction-github-labeler@v5.1.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
yaml-file: .tmp/labels.yml
dry-run: true
lint:
name: Linters
if: "!startsWith(github.ref, 'refs/heads/dependabot')"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Hadolint
uses: hadolint/hadolint-action@v3.1.0
with:
dockerfile: Dockerfile
# build_and_push:
# name: Build & push
# if: "!startsWith(github.ref, 'refs/heads/dependabot')"
# runs-on: ubuntu-latest
# strategy:
# fail-fast: false
# matrix:
# flavour: [slim, plain, aws, azure, gcp, aws-azure, aws-gcp, azure-gcp, aws-azure-gcp, yc]
# steps:
# - name: Checkout
# uses: actions/checkout@v4
#
# - name: Docker Buildx
# uses: docker/setup-buildx-action@v3.7.1
# with:
# install: true
#
# - name: QEMU
# uses: docker/setup-qemu-action@v3.2.0
# with:
# image: tonistiigi/binfmt:latest
# platforms: amd64,arm64
#
# - name: Build & push
# env:
# DOCKER_BUILDKIT: 1
# DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# TERM: xterm-256color
# run: make push-${{ matrix.flavour }} VERSION_PREFIX=test-
build_and_push:
name: Build & push
if: "!startsWith(github.ref, 'refs/heads/dependabot')"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Docker Buildx
uses: docker/setup-buildx-action@v3.7.1
with:
install: true
- name: QEMU
uses: docker/setup-qemu-action@v3.2.0
with:
image: tonistiigi/binfmt:latest
platforms: amd64,arm64
- name: Build aws-azure-gcp
env:
DOCKER_BUILDKIT: 1
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TERM: xterm-256color
run: make build-aws-azure-gcp VERSION_PREFIX=test-
- name: Build yc
env:
DOCKER_BUILDKIT: 1
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TERM: xterm-256color
run: make build-yc VERSION_PREFIX=test-
build_dependabot:
name: Dependabot build
if: "startsWith(github.ref, 'refs/heads/dependabot')"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Docker Buildx
uses: docker/setup-buildx-action@v3.7.1
with:
install: true
- name: QEMU
uses: docker/setup-qemu-action@v3.2.0
with:
image: tonistiigi/binfmt:latest
platforms: amd64,arm64
- name: Build
env:
DOCKER_BUILDKIT: 1
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TERM: xterm-256color
run: make build-aws-azure-gcp VERSION_PREFIX=test-
pull_request:
name: Create Pull Request
runs-on: ubuntu-latest
steps:
- name: Get current date
id: date
run: echo "curr_date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Template
shell: bash
run: |
mkdir -p .tmp
curl -LsS https://raw.githubusercontent.com/devops-infra/.github/master/PULL_REQUEST_TEMPLATE.md -o .tmp/PULL_REQUEST_TEMPLATE.md
- name: PR - bugfix (conditional)
if: startsWith(github.ref, 'refs/heads/bugfix')
uses: devops-infra/action-pull-request@v0.5.5
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
assignee: ${{ github.actor }}
label: bugfix
template: .tmp/PULL_REQUEST_TEMPLATE.md
get_diff: true
- name: PR - dependency (conditional)
if: startsWith(github.ref, 'refs/heads/dependency')
uses: devops-infra/action-pull-request@v0.5.5
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
assignee: ${{ github.actor }}
label: dependency
template: .tmp/PULL_REQUEST_TEMPLATE.md
get_diff: true
- name: PR - documentation (conditional)
if: startsWith(github.ref, 'refs/heads/documentation')
uses: devops-infra/action-pull-request@v0.5.5
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
assignee: ${{ github.actor }}
label: documentation
template: .tmp/PULL_REQUEST_TEMPLATE.md
get_diff: true
- name: PR - feature (conditional)
if: startsWith(github.ref, 'refs/heads/feature')
uses: devops-infra/action-pull-request@v0.5.5
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
assignee: ${{ github.actor }}
label: feature
template: .tmp/PULL_REQUEST_TEMPLATE.md
get_diff: true
- name: PR - test (conditional)
if: startsWith(github.ref, 'refs/heads/test')
uses: devops-infra/action-pull-request@v0.5.5
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
assignee: ${{ github.actor }}
reviewer: ${{ github.actor }}
label: test
template: .tmp/PULL_REQUEST_TEMPLATE.md
draft: true
get_diff: true
- name: PR - other (conditional)
if: "!startsWith(github.ref, 'refs/heads/bugfix') && !startsWith(github.ref, 'refs/heads/dependabot') && !startsWith(github.ref, 'refs/heads/dependency') && !startsWith(github.ref, 'refs/heads/documentation') && !startsWith(github.ref, 'refs/heads/feature') && !startsWith(github.ref, 'refs/heads/test')"
uses: devops-infra/action-pull-request@v0.5.5
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
assignee: ${{ github.actor }}
label: feature
template: .tmp/PULL_REQUEST_TEMPLATE.md
get_diff: true