47 lines
1.4 KiB
YAML
47 lines
1.4 KiB
YAML
name: ci
|
|
|
|
on:
|
|
# Start workflow on every push
|
|
#push:
|
|
# Start workflow on pull requests on specific branches
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
- development
|
|
|
|
jobs:
|
|
docker:
|
|
runs-on: docker
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Repository meta
|
|
id: repository
|
|
run: |
|
|
registry=${{ github.server_url }}
|
|
registry=${registry##http*://}
|
|
echo "registry=${registry}" >> "$GITHUB_OUTPUT"
|
|
repository="$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')"
|
|
echo "repository=${repository}" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Docker meta
|
|
uses: docker/metadata-action@v5
|
|
id: docker
|
|
with:
|
|
images: ${{ steps.repository.outputs.registry }}/${{ steps.repository.outputs.repository }}
|
|
|
|
- name: Build and push
|
|
uses: https://codeberg.org/umglurf/kaniko-action@main
|
|
with:
|
|
credentials: |
|
|
${{ steps.repository.outputs.registry }}=${{ github.repository }}:${{ secrets.PACKAGES_TOKEN }}
|
|
destinations: |
|
|
${{ steps.docker.outputs.tags }}
|
|
# Fine grained control of pushing based on event name
|
|
#push: ${{ github.event_name != 'pull_request' }}
|
|
# Always push
|
|
push: 'true'
|