diff --git a/.github/workflows/build-manual.yaml b/.github/workflows/build-manual.yaml index 8a59a2d8..5eb1faf0 100644 --- a/.github/workflows/build-manual.yaml +++ b/.github/workflows/build-manual.yaml @@ -18,17 +18,11 @@ jobs: - name: Configure build id: config run: | - if [ 'schedule' = "${{ github.event_name }}" ]; then - pandoc_versions="['edge']" - stacks="['alpine','ubuntu','static']" - build=true - else - versions="'edge'" - pandoc_versions="[${versions}]" - stacks="'alpine'" - stacks="[${stacks}]" - build=true - fi + versions="'3.1.12'" + pandoc_versions="[${versions}]" + stacks="'alpine'" + stacks="[${stacks}]" + build=true printf "Setting outputs:\n" printf " - pandoc-versions: %s\n" "$pandoc_versions" @@ -66,16 +60,32 @@ jobs: if: ${{ matrix.stack != 'static' }} run: make extra + - name: Publish freeze file on fail + if: failure() + uses: actions/upload-artifact@ef09cdac3e2d3e60d8ccadda691f4f1cec5035cb #v4.3.1 + 3 commits + with: + if-no-files-found: error + name: freeze-file + retention-days: 3 + path: ${{ github.workspace }}/alpine/freeze/pandoc-3.1.12.project.freeze + - name: Test extra image if: ${{ matrix.stack != 'static' }} run: make test-extra + - name: Log into ghcr.io + if: > + github.event_name != 'pull_request' && + github.repository == 'innofactororg/pandoc-dockerfiles' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Push - if: github.repository == 'innofactororg/pandoc-dockerfiles' + if: > + github.event_name != 'pull_request' && + github.repository == 'innofactororg/pandoc-dockerfiles' run: | - # Log into registry - echo "${{ secrets.DOCKER_HUB_TOKEN }}" | - docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin - if [ "$STACK" != 'static' ]; then - make push-extra - fi + make push-extra diff --git a/Makefile b/Makefile index 1faedba9..13a72896 100644 --- a/Makefile +++ b/Makefile @@ -112,8 +112,8 @@ freeze-file: $(STACK)/$(stack_freeze_file) $(docker_cpu_options) docker run --rm \ -v "$(makefile_dir):/app" \ - --env WITHOUT_CROSSREF=$(WITHOUT_CROSSREF) \ - reijoh/$(STACK)-builder-base:latest-$(STACK) \ + --env WITHOUT_CROSSREF=true \ + ghcr.io/innofactororg/$(STACK)-builder-base:latest-$(STACK) \ sh /app/common/pandoc-freeze.sh \ -c $(PANDOC_COMMIT) \ -u "$(shell id -u):$(shell id -g)" \ @@ -161,19 +161,19 @@ extra: $(STACK)/$(stack_freeze_file) $(docker_cpu_options) # Test ################################################################## .PHONY: test-core test-extra test-latex test-minimal -test-minimal: IMAGE ?= reijoh/minimal:$(PANDOC_VERSION)-$(STACK) +test-minimal: IMAGE ?= ghcr.io/innofactororg/minimal:$(PANDOC_VERSION)-$(STACK) test-minimal: IMAGE=$(IMAGE) make -C test test-minimal -test-core: IMAGE ?= reijoh/core:$(PANDOC_VERSION)-$(STACK) +test-core: IMAGE ?= ghcr.io/innofactororg/core:$(PANDOC_VERSION)-$(STACK) test-core: test -n "$(WITHOUT_CROSSREF)" || IMAGE=$(IMAGE) make -C test test-core -test-latex: IMAGE ?= reijoh/latex:$(PANDOC_VERSION)-$(STACK) +test-latex: IMAGE ?= ghcr.io/innofactororg/latex:$(PANDOC_VERSION)-$(STACK) test-latex: IMAGE=$(IMAGE) make -C test test-latex -test-extra: IMAGE ?= reijoh/pandoc-extra:$(PANDOC_VERSION)-$(STACK) +test-extra: IMAGE ?= ghcr.io/innofactororg/pandoc-extra:$(PANDOC_VERSION)-$(STACK) test-extra: IMAGE=$(IMAGE) make -C test test-extra diff --git a/build.sh b/build.sh index faa4dcc2..029fadcd 100755 --- a/build.sh +++ b/build.sh @@ -92,7 +92,9 @@ fi pandoc_version_opts=$(grep "^| *${pandoc_commit} *|" "$version_table_file") if [ -z "$pandoc_version_opts" ]; then - printf 'Unsupported version: %s; aborting!\n' "$pandoc_commit" >&2 + printf 'Unsupported version: %s; trying to create freeze file!\n' "$pandoc_commit" >&2 + export PANDOC_VERSION="$pandoc_commit" + make alpine-freeze-file exit 1 fi @@ -167,9 +169,9 @@ is_default_stack_for_repo () image_name () { if [ -z "$2" ]; then - printf 'reijoh/%s:%s' "$repo" "${1:-edge}" + printf 'ghcr.io/innofactororg/%s:%s' "$repo" "${1:-edge}" else - printf 'reijoh/%s:%s-%s' "$repo" "${1:-edge}" "$2" + printf 'ghcr.io/innofactororg/%s:%s-%s' "$repo" "${1:-edge}" "$2" fi } diff --git a/test/Makefile b/test/Makefile index e0373ffd..a9b4149d 100644 --- a/test/Makefile +++ b/test/Makefile @@ -6,9 +6,9 @@ # The IMAGE variable is required to be defined in order to `docker run` the # various tests. The parent Makefile test targets define this, or alternatively # -# 1. IMAGE=reijoh/image:tag make test-minimal -# 2. IMAGE=reijoh/image:tag make test-latex -# 3. IMAGE=reijoh/image:tag make test-extra +# 1. IMAGE=ghcr.io/innofactororg/image:tag make test-minimal +# 2. IMAGE=ghcr.io/innofactororg/image:tag make test-latex +# 3. IMAGE=ghcr.io/innofactororg/image:tag make test-extra ifndef IMAGE $(error IMAGE variable must be set to docker image to test) endif