michals-silly-game-backend/.forgejo/workflows/deploy.yaml
miwr 94d4fbe884
Some checks failed
ci / build (push) Failing after 20s
maven
2025-04-14 11:04:18 +02:00

58 lines
2 KiB
YAML

name: ci
on: push
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Repository meta
id: repository
run: |
registry=${{ github.server_url }}
registry=${registry##http*://}
echo "registry=${registry}" >> "$GITHUB_OUTPUT"
echo "registry=${registry}"
repository="$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')"
echo "repository=${repository}" >> "$GITHUB_OUTPUT"
echo "repository=${repository}"
- name: Docker meta
uses: docker/metadata-action@v5
id: docker
with:
images: ${{ steps.repository.outputs.registry }}/${{ steps.repository.outputs.repository }}
- name: Login to registry
uses: docker/login-action@v3
with:
registry: ${{ steps.repository.outputs.registry }}
username: ${{ secrets.PACKAGES_USER }}
password: ${{ secrets.PACKAGES_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
buildkitd-flags: '--allow-insecure-entitlement network.host'
driver-opts: network=host
- name: Checkout code
uses: actions/checkout@v4
- name: Install Maven
run: |
wget https://apache.mirror.digitalpacific.com.au/maven/maven-3/3.8.6/binaries/apache-maven-3.8.6-bin.tar.gz
tar -xvzf apache-maven-3.8.6-bin.tar.gz
sudo mv apache-maven-3.8.6 /opt/maven
sudo ln -s /opt/maven/bin/mvn /usr/local/bin/mvn
- name: Verify Maven installation
run: mvn -v
- name: Update version
run: |
chmod +x update-version.sh
./update-version.sh
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
allow: network.host
network: host
platforms: linux/arm64
tags: ${{ steps.docker.outputs.tags }}