Switch to podman
This commit is contained in:
parent
269c65b8c2
commit
899c1efc15
1 changed files with 25 additions and 26 deletions
|
|
@ -12,33 +12,32 @@ jobs:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
|
|
||||||
- name: Log in to Codeberg Container Registry
|
- name: Log in to Codeberg Container Registry
|
||||||
uses: docker/login-action@v3
|
run: |
|
||||||
with:
|
echo "${{ secrets.CODEBERG_TOKEN }}" | podman login --username "${{ secrets.CODEBERG_USERNAME }}" --password-stdin codeberg.org
|
||||||
registry: codeberg.org
|
|
||||||
username: ${{ secrets.CODEBERG_USERNAME }}
|
|
||||||
password: ${{ secrets.CODEBERG_TOKEN }}
|
|
||||||
|
|
||||||
- name: Extract metadata
|
- name: Extract version
|
||||||
id: meta
|
id: version
|
||||||
uses: docker/metadata-action@v5
|
run: |
|
||||||
with:
|
if [[ "${{ github.ref }}" == refs/tags/* ]]; then
|
||||||
images: codeberg.org/lvl0/incr
|
VERSION=${GITHUB_REF#refs/tags/v}
|
||||||
tags: |
|
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||||
type=semver,pattern={{version}}
|
echo "major_minor=$(echo $VERSION | cut -d. -f1-2)" >> $GITHUB_OUTPUT
|
||||||
type=semver,pattern={{major}}.{{minor}}
|
else
|
||||||
type=raw,value=latest
|
echo "version=latest" >> $GITHUB_OUTPUT
|
||||||
|
echo "major_minor=latest" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Build and push Docker image
|
- name: Build and push Docker image
|
||||||
uses: docker/build-push-action@v5
|
run: |
|
||||||
with:
|
if [[ "${{ github.ref }}" == refs/tags/* ]]; then
|
||||||
context: .
|
podman build -f docker/Dockerfile -t codeberg.org/lvl0/incr:${{ steps.version.outputs.version }} .
|
||||||
file: ./docker/Dockerfile
|
podman build -f docker/Dockerfile -t codeberg.org/lvl0/incr:${{ steps.version.outputs.major_minor }} .
|
||||||
push: true
|
podman build -f docker/Dockerfile -t codeberg.org/lvl0/incr:latest .
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
podman push codeberg.org/lvl0/incr:${{ steps.version.outputs.version }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
podman push codeberg.org/lvl0/incr:${{ steps.version.outputs.major_minor }}
|
||||||
cache-from: type=gha
|
podman push codeberg.org/lvl0/incr:latest
|
||||||
cache-to: type=gha,mode=max
|
else
|
||||||
|
podman build -f docker/Dockerfile -t codeberg.org/lvl0/incr:latest .
|
||||||
|
podman push codeberg.org/lvl0/incr:latest
|
||||||
|
fi
|
||||||
Loading…
Reference in a new issue