This commit is contained in:
@@ -13,34 +13,20 @@ jobs:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Podman
|
||||
run: |
|
||||
export XDG_RUNTIME_DIR=/tmp/run-user
|
||||
export HOME=/tmp/home
|
||||
mkdir -p $XDG_RUNTIME_DIR $HOME
|
||||
# Ensure Podman is installed
|
||||
if ! command -v podman &> /dev/null; then
|
||||
echo "Podman not found, installing..."
|
||||
sudo apt-get update && sudo apt-get install -y podman
|
||||
fi
|
||||
podman info || true # info will fail if storage driver is overlay, ignore
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Log in to Docker registry
|
||||
run: |
|
||||
echo "${REGISTRY_PASSWORD}" | podman login ${GITEA_REGISTRY} \
|
||||
--username ${REGISTRY_USERNAME} --password-stdin
|
||||
uses: docker/login-action@v2
|
||||
env:
|
||||
registry: https://gitea.papryk.com
|
||||
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
|
||||
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
run: |
|
||||
IMAGE_TAG="Papryk/dj-spangebob:${{ gitea.ref_name }}"
|
||||
echo "Building image $IMAGE_TAG"
|
||||
podman build -t "$IMAGE_TAG" .
|
||||
echo "Pushing image $IMAGE_TAG"
|
||||
podman push "$IMAGE_TAG"
|
||||
env:
|
||||
TAG: ${{ gitea.ref_name }}
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: "https://gitea.papryk.com/Papryk/dj-spangebob:${{ gitea.ref_name }}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user