Skip to content

fix workflow

fix workflow #16

Workflow file for this run

name: Continuous Integration
on:
pull_request:
push:
branches:
- main
- "releases/*"
jobs:
test-javascript:
name: JavaScript Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
- name: Setup Node.js
id: setup-node
uses: actions/setup-node@v3
with:
node-version: 20
cache: npm
- name: Install Dependencies
id: npm-ci
run: npm ci
- name: Check Format
id: npm-format-check
run: npm run format:check
- name: Lint
id: npm-lint
run: npm run lint
- name: Test
id: npm-ci-test
run: npm run ci-test
test-action:
name: GitHub Actions Test
runs-on: ubuntu-latest
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
- name: Create files
run: |
echo -n amd64 > arch_amd64
echo -n arm64 > arch_arm64
echo -n arm > arch_arm
cat > Containerfile <<EOF
FROM docker.io/library/alpine:3.18
ARG TARGETARCH
COPY arch_\$TARGETARCH /arch
CMD cat /arch
EOF
- name: Run Local Action
id: test-action
uses: ./
with:
platforms: |
linux/amd64
linux/arm64
linux/arm
podman-image: quay.io/containers/podman:v4.6
repository: test
tags: |
latest
v1
- name: Install qemu dependency
run: |
sudo apt-get update
sudo apt-get install -y qemu-user-static
- name: Test images
run: |
echo "Check manifest: test:latest"
podman manifest exists test:latest
echo "Check manifest: test:v1"
podman manifest exists test:v1
# We have to select image manually on older versions of podman
# Reference: https://github.com/containers/podman/pull/14827
echo "Check result: linux/amd64"
DIGEST=$(podman manifest inspect test:v1 | jq '.manifests[] | select(.platform.architecture=="amd64") | .digest')
echo "Image digest: $DIGEST"
RESULT=$(podman run --rm localhost/test:v1@$DIGEST)
echo $RESULT
test "$RESULT" == "amd64"
echo "Check result: linux/arm64"
DIGEST=$(podman manifest inspect test:v1 | jq '.manifests[] | select(.platform.architecture=="arm64") | .digest')
echo "Image digest: $DIGEST"
RESULT=$(podman run --rm localhost/test:v1@$DIGEST)
echo $RESULT
test "$RESULT" == "arm64"
echo "Check result: linux/arm"
DIGEST=$(podman manifest inspect test:v1 | jq '.manifests[] | select(.platform.architecture=="arm") | .digest')
echo "Image digest: $DIGEST"
RESULT=$(podman run --rm localhost/test:v1@$DIGEST)
echo $RESULT
test "$RESULT" == "arm"