Skip to content

chore: update edgepkgs #1123

chore: update edgepkgs

chore: update edgepkgs #1123

Workflow file for this run

name: build and publish container images
on:
pull_request:
branches:
- main
push:
branches:
- main
paths:
- 'container/**'
- '.github/workflows/container.yaml'
jobs:
changes:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
pull-requests: read
outputs:
container: ${{ steps.filter.outputs.container }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
id: filter
with:
filters: |
container:
- 'container/**'
- '.github/workflows/container.yaml'
build:
needs: changes
if: ${{ !cancelled() }}
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read
packages: write
strategy:
matrix:
image: [base, nodejs, python, rust]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
if: needs.changes.outputs.container == 'true' || github.event_name == 'push'
- uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
if: (needs.changes.outputs.container == 'true' || github.event_name == 'push') && github.event_name != 'pull_request'
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6.0.0
if: needs.changes.outputs.container == 'true' || github.event_name == 'push'
id: meta
with:
images: |
ghcr.io/natsukium/${{ matrix.image }}
- uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7.0.0
if: needs.changes.outputs.container == 'true' || github.event_name == 'push'
with:
push: ${{ github.event_name != 'pull_request' }}
context: container
file: container/Containerfile
build-args: |-
IMAGE=${{ matrix.image }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}