53 lines
1.6 KiB
YAML
53 lines
1.6 KiB
YAML
on:
|
|
push:
|
|
branches:
|
|
- feature/oci-cd
|
|
schedule:
|
|
- cron: '@weekly' # once per week
|
|
|
|
jobs:
|
|
|
|
build-push-image:
|
|
runs-on: ["oci-image-builder", "amd64"]
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Fetch limbo public actions
|
|
env:
|
|
RUNNER_TEMP: "${{ runner.temp }}"
|
|
WORKSPACE: "${{ gitea.workspace }}"
|
|
run: |
|
|
curl -fsSL https://git.limbosolutions.com/kb/gitea/raw/branch/main/cloud-scripts/setup-limbo-actions.sh | bash 2>&1
|
|
|
|
|
|
- name: run buildctl build and push
|
|
shell: bash
|
|
run: |
|
|
USER='${{ secrets.OCI_LIMBO_REGISTRY_DEVCONTAINERS_USERNAME }}'
|
|
PASS='${{ secrets.OCI_LIMBO_REGISTRY_DEVCONTAINERS_PASSWORD }}'
|
|
AUTH=$(printf '%s:%s' "$USER" "$PASS" | base64 -w0)
|
|
cat > "/root/tmp_config.json" <<EOF
|
|
{
|
|
"auths": {
|
|
"${{ vars.OCI_LIMBO_REGISTRY_ADDRESS }}": {
|
|
"auth": "$AUTH"
|
|
}
|
|
}
|
|
}
|
|
EOF
|
|
cat /root/tmp_config.json
|
|
|
|
- name: Build and push Image
|
|
uses: ./.gitea/limbo_actions/buildkit-build-push
|
|
with:
|
|
tags: oci.limbosolutions.com/devcontainers/devops:latest
|
|
registry_addr: ${{ vars.OCI_LIMBO_REGISTRY_ADDRESS }}
|
|
registry_username: ${{ secrets.OCI_LIMBO_REGISTRY_DEVCONTAINERS_USERNAME }}
|
|
registry_password: ${{ secrets.OCI_LIMBO_REGISTRY_DEVCONTAINERS_PASSWORD }}
|
|
buildkit_addr: ${{ vars.BUILDKIT_ADDRESS }}
|
|
dockerfile: ${{gitea.workspace}}/devops
|
|
context: ${{gitea.workspace}}/devops
|