Skip to content

Update build-p2-site.yaml #8

Update build-p2-site.yaml

Update build-p2-site.yaml #8

name: Build P2 Site
env:
TARGET: '2023-09-java21'
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
DEPLOY_SECRET: ${{ secrets.SSH_PRIVATE_KEY_ED25519_BASE64 }}
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
on:
push:
workflow_dispatch:
jobs:
build:
runs-on: [self-hosted, Linux, x64, Docker]
steps:
- uses: actions/checkout@v4
- name: pull docker image docker-build:${{ env.TARGET }}
run: docker pull ghcr.io/elexis/docker-build:${{ env.TARGET }}
- name: build using docker image docker-build:${{ env.TARGET }}
run: docker run --rm --init -v "$(pwd)":/usr/src/mymaven -v "$(eval echo ~$USER)/m2-${{ env.BRANCH_NAME }}":/root/.m2 -w /usr/src/mymaven ghcr.io/elexis/docker-build:${{ env.TARGET }} mvn -f releng/es.parent/pom.xml clean verify -Delexis.branch=${{ env.BRANCH_NAME }}
- name: upload artifacts
run: |
eval $(ssh-agent -s)
ssh-add <(echo "${{ env.DEPLOY_SECRET }}" | base64 -d)
rsync -aiv --delete --mkpath -e ssh products/es.updatesite/target/repository/ [email protected]:download.elexis.info/elexis-server/${{ env.BRANCH_NAME }}/p2/elexis-server/
rsync -aiv --no-recursive -e ssh products/es.core.product.runtime/target/products/* [email protected]:download.elexis.info/elexis-server/${{ env.BRANCH_NAME }}/products/
eval $(ssh-agent -k)
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ REGISTRY }}

Check failure on line 34 in .github/workflows/build-p2-site.yaml

View workflow run for this annotation

GitHub Actions / Build P2 Site

Invalid workflow file

The workflow is not valid. .github/workflows/build-p2-site.yaml (Line: 34, Col: 21): Unrecognized named-value: 'REGISTRY'. Located at position 1 within expression: REGISTRY
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
id: push
uses: docker/build-push-action@v6
with:
context: .
push: true
pull: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true