evito de xslt-problemo metante plurloke net.sf.saxon.TransformerFacto… #255
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: procezujo voko-formiko | |
# https://github.com/actions/starter-workflows/blob/master/ci/docker-push.yml | |
on: | |
push: | |
# Publish `master` as Docker `latest` image. | |
branches: | |
- master | |
# Publish `v1.2.3` tags as releases. | |
tags: | |
- v* | |
- stabila | |
# Run tests for any PRs. | |
pull_request: | |
env: | |
# image name. | |
IMAGE_NAME: voko-formiko | |
# IMAGE_ENTRY: formiko | |
# IMAGE_TEST: med-medio | |
ORGANIZATION: revuloj | |
jobs: | |
# kreu procezujon kaj estu ĝin... | |
# vd. ankaŭ https://docs.docker.com/docker-hub/builds/automated-testing/ | |
testo: | |
runs-on: ubuntu-latest | |
steps: | |
# https://github.com/actions/checkout | |
- name: Ricevi la aktualan kodon | |
uses: actions/checkout@v4 | |
# - name: Run tests | |
# run: | | |
# if [ -f docker-compose.test.yml ]; then | |
# docker-compose --file docker-compose.test.yml build | |
# docker-compose --file docker-compose.test.yml run sut | |
# else | |
# docker build . --file Dockerfile | |
# fi | |
- name: Kreo de ${{ env.IMAGE_NAME }} | |
run: | | |
# kreu la procezujon | |
./sbin/eldono kreo | |
- name: Testoj de ${{ env.IMAGE_NAME }} | |
run: | | |
docker run $IMAGE_NAME formiko med-kls | |
docker run $IMAGE_NAME formiko-testo | |
docker run -u1001 $IMAGE_NAME voko/bin/xsl-testo | |
- name: Arĥivo de ${{ env.IMAGE_NAME }} | |
run: | | |
docker image save -o ${IMAGE_NAME}.tar ${IMAGE_NAME} | |
# https://github.com/actions/upload-artifact | |
- name: Konservo de ${{ env.IMAGE_NAME }} por la sekvonta tasko | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ env.IMAGE_NAME }} | |
path: ${{ env.IMAGE_NAME }}.tar | |
# Push image to GitHub Package Registry. | |
# See also https://docs.docker.com/docker-hub/builds/ | |
sendo: | |
# Ensure test job passes before pushing image. | |
needs: testo | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' | |
steps: | |
# https://github.com/actions/download-artifact | |
- name: Reakiro de ${{ env.IMAGE_NAME }} | |
uses: actions/download-artifact@v4 | |
with: | |
name: ${{ env.IMAGE_NAME }} | |
path: image | |
# - uses: actions/checkout@v1 | |
# | |
# - name: Build image | |
# run: docker build . --file Dockerfile --tag $IMAGE_NAME | |
- name: Saluto al ghcr.io | |
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
- name: Puŝo de ${{ env.IMAGE_NAME }} | |
run: | | |
docker image load -i image/${IMAGE_NAME}.tar | |
# ĉu eblas ankau nur /revuloj/ ($ORGANIZATION) ? | |
IMAGE_ID=ghcr.io/${{ github.repository }}/$IMAGE_NAME | |
# Strip git ref prefix from version | |
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') | |
# Strip "v" prefix from tag name | |
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') | |
# Use Docker `latest` tag convention | |
[ "$VERSION" == "master" ] && VERSION=latest | |
echo IMAGE_ID=$IMAGE_ID | |
echo VERSION=$VERSION | |
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION | |
docker push $IMAGE_ID:$VERSION |