Skip to content

Merge pull request #178 from crazy-max/corepack #186

Merge pull request #178 from crazy-max/corepack

Merge pull request #178 from crazy-max/corepack #186

Workflow file for this run

name: image
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches:
- 'master'
- 'releases/v*'
tags:
- '*'
paths-ignore:
- '**.md'
pull_request:
branches:
- 'master'
- 'releases/v*'
paths-ignore:
- '**.md'
env:
DOCKERHUB_SLUG: crazymax/ghaction-chocolatey
GHCR_SLUG: ghcr.io/crazy-max/ghaction-chocolatey
jobs:
release:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
${{ env.DOCKERHUB_SLUG }}
${{ env.GHCR_SLUG }}
tags: |
type=ref,event=tag
type=ref,event=pr
type=edge
labels: |
org.opencontainers.image.title=Chocolatey Action
org.opencontainers.image.description=GitHub Action for Chocolatey, the package manager for Windows
org.opencontainers.image.vendor=CrazyMax
com.github.actions.name=Chocolatey Action
com.github.actions.description=GitHub Action for Chocolatey, the package manager for Windows
com.github.actions.icon=terminal
com.github.actions.color=blue
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
-
name: Login to GHCR
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build
uses: docker/bake-action@v4
with:
files: |
./docker-bake.hcl
${{ steps.meta.outputs.bake-file }}
targets: image
push: ${{ github.event_name != 'pull_request' }}