Skip to content

v2

v2 #20

Workflow file for this run

name: ci·docker
on:
pull_request:
paths:
- .github/Dockerfile
- .github/workflows/ci.docker.yml
concurrency:
group: ci/docker/${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
packages: write
jobs:
docker-build:
runs-on: ubuntu-latest
container: debian:buster-slim
steps:
- uses: actions/checkout@v4
- run: apt-get update && apt-get install -y curl gcc perl make
- uses: dtolnay/rust-toolchain@stable
- run: cargo build
- uses: actions/upload-artifact@v4
with:
name: products
path: ./target/debug/pkgx
docker-test:
runs-on: ubuntu-latest
needs: docker-build
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: products
- run: |
mkdir products
mv ./pkgx products/$(uname -m)
curl https://pkgxdev.github.io/pkgm/pkgm.ts -o products/pkgm
- run:
docker build
--tag pkgxdev/pkgx
--file .github/Dockerfile
.
- run: |
cat <<EoD> Dockerfile
FROM pkgxdev/pkgx
RUN pkgx --version
RUN if git --version; then exit 1; fi
RUN pkgx git --version
RUN pkgm install git
RUN if ! git --version; then exit 2; fi
EoD
docker build --file Dockerfile .