Skip to content

chore: update edgepkgs #1577

chore: update edgepkgs

chore: update edgepkgs #1577

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@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: dorny/paths-filter@7b450fff21473bca461d4b92ce414b9d0420d706 # v4.0.2
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@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
if: needs.changes.outputs.container == 'true' || github.event_name == 'push'
- uses: docker/login-action@af1e73f918a031802d376d3c8bbc3fe56130a9b0 # v4.4.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@dc802804100637a589fabce1cb79ff13a1411302 # v6.2.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@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.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 }}