Skip to content

dispatch-from-pyos #703

dispatch-from-pyos

dispatch-from-pyos #703

Workflow file for this run

name: Update oc.pyos
on:
repository_dispatch:
types: dispatch-from-pyos
push:
branches:
- main
env:
imagetag: "${{ github.event.client_payload.ref || github.ref_name }}"
jobs:
# Run tests.
# See also https://docs.docker.com/docker-hub/builds/automated-testing/
build:
runs-on: ubuntu-latest
# runs-on: self-hosted
steps:
- uses: actions/checkout@v4
with:
ref: main
- name: dump-github-event-client_payload
run: echo "current source branch is ${{ github.event.client_payload.ref || 'main' }}"
- name: clone pyos main branch
run: |
cd var
git clone -b ${{ github.event.client_payload.ref || 'main' }} https://github.com/abcdesktopio/pyos
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: "image tag"
run: echo "image tag set to '${{ env.imagetag }}'"
- name: Build and push
uses: docker/build-push-action@v5
with:
platforms: linux/amd64, linux/arm64
context: .
file: Dockerfile
push: true
tags: |
abcdesktopio/oc.pyos:${{ env.imagetag }}
# - name: update platform
# run: curl -X POST -u "${{ secrets.WEBHOOK_USERNAME }}:${{ secrets.WEBHOOK_PASSWORD }}" -d "daemonset-pyos" "${{ secrets.WEBHOOK_URL }}/kubernetes/rollout"