diff --git a/.github/workflows/failed-release.yml b/.github/workflows/failed-release.yml new file mode 100644 index 0000000000..d598d74112 --- /dev/null +++ b/.github/workflows/failed-release.yml @@ -0,0 +1,15 @@ +name: Check for successful release + +on: + check_suite: + type: ['completed'] + +name: Continue after Cirrus CI Complets Successfully + +jobs: + continue: + name: After release + runs-on: ubuntu-latest + steps: + - name: Create github issue + run: echo "${{ github.event.check_suite.app.name }}" diff --git a/.github/workflows/release-debian.yml b/.github/workflows/release-debian.yml index 9eadce27a8..5293f9e765 100644 --- a/.github/workflows/release-debian.yml +++ b/.github/workflows/release-debian.yml @@ -15,107 +15,6 @@ jobs: container: image: "ubuntu:bionic" steps: - - name: Install dependencies + - name: fail run: | - apt-get update - apt-get -y upgrade - apt-get -y install devscripts dpkg-dev debhelper equivs - - name: Enable faucet apt repo - run: | - echo "deb https://packagecloud.io/faucetsdn/faucet/$(lsb_release -si | awk '{print tolower($0)}')/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/faucet.list - curl -L https://packagecloud.io/faucetsdn/faucet/gpgkey | apt-key add - - apt-get update - - name: Checkout repo - uses: actions/checkout@v2 - - name: Bump version - run: | - export DEBEMAIL='maintainers@faucet.nz' - export DEBFULLNAME='Faucet Maintainers' - debchange --newversion ${{ github.event.release.tag_name }} -b "New upstream release" - - name: Build package - run: | - mk-build-deps -i -r -t 'apt-get -f -y --force-yes' - dpkg-buildpackage -b -us -uc -rfakeroot - - name: Store package - run: | - mkdir -p packages/all - cp ../*.deb packages/all - - name: Publish package on packagecloud - uses: faucetsdn/action-packagecloud-upload-debian-packages@v1 - with: - path: packages/ - repo: faucetsdn/faucet - token: ${{ secrets.PACKAGECLOUD_TOKEN }} - - vm-image: - name: "Build VM image" - runs-on: ubuntu-latest - container: - image: "ubuntu:focal" - options: --privileged - needs: debian-package - steps: - - name: Install dependencies - run: | - apt-get update - apt-get -y upgrade - apt-get -y install locate python3-pip qemu-utils kpartx squashfs-tools debootstrap procps wget sudo git - pip3 install diskimage-builder - - name: Checkout repo - uses: actions/checkout@v2 - - name: Build image - run: | - cd images/vm/ - ./build-faucet-vm.sh - - name: Upload release asset - id: upload-release-asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: ./images/vm/faucet-amd64-${{ github.event.release.tag_name }}.qcow2 - asset_name: faucet-amd64-${{ github.event.release.tag_name }}.qcow2 - asset_content_type: application/octet-stream - - rpi-image: - name: "Build raspberry pi image" - runs-on: ubuntu-latest - container: - image: "ubuntu:bionic" - options: --privileged - needs: debian-package - steps: - - name: Install dependencies - run: | - dpkg --add-architecture i386 - apt-get update - apt-get -y upgrade - apt-get install -y coreutils quilt parted qemu-user-static:i386 debootstrap zerofree zip dosfstools libarchive-tools libcap2-bin grep rsync xz-utils file git curl bc xxd kmod binfmt-support - /usr/sbin/update-binfmts --enable - - name: Checkout repo - uses: actions/checkout@v2 - - name: Install pi-gen - run: | - cd images/raspbian/ - git clone https://github.com/RPi-Distro/pi-gen.git - cd pi-gen - mv ../install-faucet.sh ./stage2/01-sys-tweaks/02-install-faucet.sh - - name: Build image - run: | - cd images/raspbian/pi-gen/ - echo "IMG_NAME='faucet_${{ github.event.release.tag_name }}_raspbian'" > config - touch ./stage3/SKIP ./stage4/SKIP ./stage5/SKIP - touch ./stage4/SKIP_IMAGES ./stage5/SKIP_IMAGES - ./build.sh - mv ./deploy/image_*_raspbian-lite.zip ./deploy/faucet_${{ github.event.release.tag_name }}_raspbian-lite.zip - - name: Upload release asset - id: upload-release-asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: ./images/raspbian/pi-gen/deploy/faucet_${{ github.event.release.tag_name }}_raspbian-lite.zip - asset_name: faucet_${{ github.event.release.tag_name }}_raspbian-lite.zip - asset_content_type: application/zip + echo 99 diff --git a/.github/workflows/release-docker.yml b/.github/workflows/release-docker.yml deleted file mode 100644 index cb241196ef..0000000000 --- a/.github/workflows/release-docker.yml +++ /dev/null @@ -1,110 +0,0 @@ -name: Release workflow for building docker images - -on: - release: - types: - - published - -jobs: - faucet-docker-image: - name: "Build faucet docker image" - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Set up docker buildx - id: buildx - uses: crazy-max/ghaction-docker-buildx@v3 - with: - buildx-version: latest - qemu-version: latest - - name: Login to docker registry - run: | - docker login --username ${{ secrets.DOCKER_USERNAME }} --password ${{ secrets.DOCKER_TOKEN }} - - name: Run buildx - run: | - docker buildx build \ - --tag faucet/faucet:${{ github.event.release.tag_name }} \ - --tag faucet/faucet:latest \ - --platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x \ - --output "type=registry" \ - --file Dockerfile.faucet \ - . - - gauge-docker-image: - name: "Build gauge docker image" - runs-on: ubuntu-latest - needs: faucet-docker-image - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Set up docker buildx - id: buildx - uses: crazy-max/ghaction-docker-buildx@v3 - with: - buildx-version: latest - qemu-version: latest - - name: Login to docker registry - run: | - docker login --username ${{ secrets.DOCKER_USERNAME }} --password ${{ secrets.DOCKER_TOKEN }} - - name: Run buildx - run: | - docker buildx build \ - --tag faucet/gauge:${{ github.event.release.tag_name }} \ - --tag faucet/gauge:latest \ - --platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x \ - --output "type=registry" \ - --file Dockerfile.gauge \ - . - - rabbitmq-adapter-docker-image: - name: "Build rabbitmq adapter docker image" - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Set up docker buildx - id: buildx - uses: crazy-max/ghaction-docker-buildx@v3 - with: - buildx-version: latest - qemu-version: latest - - name: Login to docker registry - run: | - docker login --username ${{ secrets.DOCKER_USERNAME }} --password ${{ secrets.DOCKER_TOKEN }} - - name: Run buildx - run: | - cd adapters/vendors/rabbitmq/ - docker buildx build \ - --tag faucet/event-adapter-rabbitmq:${{ github.event.release.tag_name }} \ - --tag faucet/event-adapter-rabbitmq:latest \ - --platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x \ - --output "type=registry" \ - --file Dockerfile \ - . - - faucetagent-adapter-docker-image: - name: "Build faucetagent adapter docker image" - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Set up docker buildx - id: buildx - uses: crazy-max/ghaction-docker-buildx@v3 - with: - buildx-version: latest - qemu-version: latest - - name: Login to docker registry - run: | - docker login --username ${{ secrets.DOCKER_USERNAME }} --password ${{ secrets.DOCKER_TOKEN }} - - name: Run buildx - run: | - cd adapters/vendors/faucetagent/ - docker buildx build \ - --tag faucet/event-adapter-faucetagent:${{ github.event.release.tag_name }} \ - --tag faucet/event-adapter-faucetagent:latest \ - --platform linux/amd64 \ - --output "type=registry" \ - --file Dockerfile \ - .