Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to GitHub Actions #31

Merged
merged 10 commits into from
Nov 12, 2021
38 changes: 0 additions & 38 deletions .drone.yml

This file was deleted.

63 changes: 63 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: ci
on:
push:
pull_request:

jobs:
pylama:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.8'
- run: pip install pylama
- run: pylama packethardware setup.py
black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.8'
- run: pip install black
- run: black --check --diff .
build-and-publish-docker-image:
name: build image and possibly push image to quay.io
runs-on: ubuntu-latest
needs: [pylama, black]
steps:
- uses: actions/checkout@v2
with:
lfs: 'true'
- uses: docker/setup-buildx-action@v1
id: buildx
- uses: docker/metadata-action@v3
id: meta
with:
images: quay.io/packet/packet-hardware
tags: |
type=ref,event=tag
type=sha
type=ref,event=branch
- uses: docker/login-action@v1
if: github.event_name == 'create' && github.event.ref_type == 'tag'
with:
registry: quay.io
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-cache
restore-keys: |
${{ runner.os }}-cache
- uses: docker/build-push-action@v2
with:
platforms: linux/amd64
push: ${{ github.event_name == 'create' && github.event.ref_type == 'tag' }}
tags: ${{ steps.meta.outputs.tags }}
context: '.'
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
builder: ${{ steps.buildx.outputs.name }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Equinix Metal Hardware

[![Build Status](https://cloud.drone.io/api/badges/packethost/packet-hardware/status.svg?ref=refs/heads/master)](https://cloud.drone.io/packethost/packet-hardware) ![](https://img.shields.io/badge/Stability-Experimental-red.svg)
![Continuous Integration](https://github.com/packethost/packet-hardware/actions/workflows/ci.yaml/badge.svg)

This is a tool which is used within [OSIE](https://github.com/tinkerbell/osie)
to audit hardware components to keep track of components that may need updating
Expand Down