v1.15.2 #337
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: | |
push: | |
branches: [master] | |
release: | |
types: [created] | |
pull_request: | |
branches: [master] | |
permissions: read-all | |
jobs: | |
build: | |
uses: miracum/.github/.github/workflows/standard-build.yaml@0c1519ab65e70ab166aa866fd298e92402b48452 # v1.12.4 | |
permissions: | |
contents: write | |
id-token: write | |
packages: write | |
pull-requests: write | |
actions: read | |
security-events: write | |
with: | |
enable-build-test-layer: true | |
enable-upload-test-image: true | |
secrets: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
lint: | |
uses: miracum/.github/.github/workflows/standard-lint.yaml@0c1519ab65e70ab166aa866fd298e92402b48452 # v1.12.4 | |
permissions: | |
contents: read | |
pull-requests: write | |
issues: write | |
security-events: write | |
actions: read | |
with: | |
enable-validate-gradle-wrapper: false | |
codeql-languages: '["javascript"]' | |
enable-codeql: true | |
secrets: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
test: | |
runs-on: ubuntu-24.04 | |
needs: | |
- build | |
steps: | |
# <https://docs.docker.com/storage/containerd/> | |
# via <https://github.com/docker/setup-buildx-action/issues/257> | |
- name: Set up containerd image store | |
shell: bash | |
run: | | |
[ -f /etc/docker/daemon.json ] || echo "{}" | sudo tee /etc/docker/daemon.json | |
jq '. | .+{"features": {"containerd-snapshotter": true}}' /etc/docker/daemon.json > /tmp/docker-daemon-with-containerd.json | |
sudo mv /tmp/docker-daemon-with-containerd.json /etc/docker/daemon.json | |
cat /etc/docker/daemon.json | |
sudo systemctl restart docker | |
docker info -f '{{ .DriverStatus }}' | |
- name: "Checkout code" | |
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | |
with: | |
persist-credentials: false | |
- name: Download build image | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
if: ${{ github.event_name == 'pull_request' }} | |
with: | |
name: ${{ needs.build.outputs.image-slug }} | |
path: /tmp | |
- name: Load image | |
if: ${{ github.event_name == 'pull_request' }} | |
run: | | |
ls -lsa /tmp | |
docker load --input /tmp/image.tar | |
docker image ls | |
# the test image is always downloaded whether its a PR or not. Only the "actual" image is pushed to | |
# the container registry on non-PRs. | |
- name: Download test image | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
name: ${{ needs.build.outputs.image-slug }}-test | |
path: /tmp | |
- name: Load test image | |
run: | | |
ls -lsa /tmp | |
docker load --input /tmp/image-test.tar | |
docker image ls | |
- name: Run E2E tests | |
env: | |
IMAGE_TAG: "${{ needs.build.outputs.image-version }}" | |
run: | | |
docker compose -f tests/e2e/compose.yaml up --abort-on-container-exit | |
docker compose -f tests/e2e/compose.yaml down --remove-orphans | |
- name: Print E2E logs | |
env: | |
IMAGE_TAG: "${{ needs.build.outputs.image-version }}" | |
if: ${{ always() }} | |
run: | | |
docker compose -f tests/e2e/compose.yaml logs | |
release: | |
uses: miracum/.github/.github/workflows/standard-release.yaml@0c1519ab65e70ab166aa866fd298e92402b48452 # v1.12.4 | |
needs: | |
- build | |
- test | |
permissions: | |
contents: write | |
pull-requests: write | |
issues: write | |
secrets: | |
semantic-release-token: ${{ secrets.MIRACUM_BOT_SEMANTIC_RELEASE_TOKEN }} |