test
This commit is contained in:
parent
73bd33ea28
commit
416988c214
1 changed files with 52 additions and 35 deletions
|
|
@ -13,39 +13,56 @@ env:
|
||||||
# Set this to the public IP or hostname of your registry,
|
# Set this to the public IP or hostname of your registry,
|
||||||
# whichever you use to reach it from your desktop/laptop
|
# whichever you use to reach it from your desktop/laptop
|
||||||
FORGEJO_HOST: code.zeidler.dev
|
FORGEJO_HOST: code.zeidler.dev
|
||||||
|
build:
|
||||||
jobs:
|
runs-on: docker
|
||||||
build-and-push:
|
container:
|
||||||
runs-on: catthehacker
|
image: catthehacker/ubuntu:act-latest
|
||||||
environment: deploy
|
|
||||||
steps:
|
steps:
|
||||||
- name: Prepare environment variables
|
- name: Wait for Docker daemon
|
||||||
run: |
|
run: |
|
||||||
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
|
timeout=300 # Set a timeout value in seconds
|
||||||
echo REGISTRY=${{ env.FORGEJO_HOST }} >> $GITHUB_ENV
|
until docker info; do
|
||||||
|
echo "Waiting for Docker daemon to start..."
|
||||||
|
sleep 5
|
||||||
|
timeout=$((timeout-5))
|
||||||
|
if [ $timeout -le 0 ]; then
|
||||||
|
echo "Timeout waiting for Docker daemon to start."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
- name: Checkout the repo
|
# jobs:
|
||||||
uses: actions/checkout@v4
|
# build-and-push:
|
||||||
|
# runs-on: catthehacker
|
||||||
- name: Login to the registry
|
# environment: deploy
|
||||||
uses: docker/login-action@v3
|
# steps:
|
||||||
with:
|
# - name: Prepare environment variables
|
||||||
registry: ${{ env.REGISTRY }}
|
# run: |
|
||||||
username: ${{ github.actor }}
|
# echo "$HOME/.local/bin" >> "$GITHUB_PATH"
|
||||||
password: ${{ secrets.PACKAGE_TOKEN }}
|
# echo REGISTRY=${{ env.FORGEJO_HOST }} >> $GITHUB_ENV
|
||||||
build:
|
#
|
||||||
runs-on: catthehacker
|
# - name: Checkout the repo
|
||||||
environment: deploy
|
# uses: actions/checkout@v4
|
||||||
steps:
|
#
|
||||||
- name: Set up Docker Buildx
|
# - name: Login to the registry
|
||||||
uses: docker/setup-buildx-action@v3
|
# uses: docker/login-action@v3
|
||||||
with:
|
# with:
|
||||||
driver: docker-container
|
# registry: ${{ env.REGISTRY }}
|
||||||
- name: Build and push
|
# username: ${{ github.actor }}
|
||||||
uses: docker/build-push-action@v6
|
# password: ${{ secrets.PACKAGE_TOKEN }}
|
||||||
with:
|
# build:
|
||||||
context: context
|
# runs-on: catthehacker
|
||||||
push: true
|
# environment: deploy
|
||||||
provenance: false
|
# steps:
|
||||||
platforms: linux/amd64, linux/arm64
|
# - name: Set up Docker Buildx
|
||||||
tags: ${{ env.REGISTRY }}/${{ github.actor }}/${{ env.CONTAINER_NAME }}:latest
|
# uses: docker/setup-buildx-action@v3
|
||||||
|
# with:
|
||||||
|
# driver: docker-container
|
||||||
|
# - name: Build and push
|
||||||
|
# uses: docker/build-push-action@v6
|
||||||
|
# with:
|
||||||
|
# context: context
|
||||||
|
# push: true
|
||||||
|
# provenance: false
|
||||||
|
# platforms: linux/amd64, linux/arm64
|
||||||
|
# tags: ${{ env.REGISTRY }}/${{ github.actor }}/${{ env.CONTAINER_NAME }}:latest
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue