Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/webpack-… #3115
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and push CLI Docker image | |
on: | |
push: | |
branches: | |
- "**" | |
tags: | |
- "cube-creator-cli/v*.*.*" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Cache Docker layers | |
uses: actions/cache@v3 | |
with: | |
path: /tmp/.buildx-cache | |
key: ${{ runner.os }}-buildx-cli-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-buildx-cli- | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
if: github.event_name != 'pull_request' | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Generate image metadata | |
uses: zazuko/action-docker-meta@main | |
id: docker_meta | |
with: | |
images: ghcr.io/zazuko/cube-creator-cli | |
strip-tag-prefix: cube-creator-cli/ | |
include-pipeline-id: true | |
- name: Build and push | |
uses: docker/build-push-action@v3 | |
with: | |
file: ./cli.Dockerfile | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ${{ steps.docker_meta.outputs.tags }} | |
labels: ${{ steps.docker_meta.outputs.labels }} | |
build-args: | | |
COMMIT=${{ github.sha }} | |
- name: Create Sentry release | |
uses: getsentry/action-release@v1 | |
if: ${{ github.actor != 'dependabot[bot]' }} | |
env: | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
SENTRY_ORG: zazuko | |
SENTRY_PROJECT: cube-creator-cli | |
with: | |
version_prefix: cube-creator-cli@ | |
ignore_empty: true |