Skip to content

Commit

Permalink
feat: move to gh workflow
Browse files Browse the repository at this point in the history
Move to GitHub workflows.

Signed-off-by: Noel Georgi <[email protected]>
  • Loading branch information
frezbo committed Oct 23, 2023
1 parent a4a52e2 commit 9a05d12
Show file tree
Hide file tree
Showing 7 changed files with 186 additions and 170 deletions.
163 changes: 0 additions & 163 deletions .drone.yml

This file was deleted.

58 changes: 58 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,61 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v3
- name: Unshallow
run: |
git fetch --prune --unshallow
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver: remote
endpoint: tcp://localhost:1234
append: |
- endpoint: tcp://buildkit-arm64.ci.svc.cluster.local:1234
platforms: linux/arm64
- name: build
run: |
make
- name: Login to registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
username: ${{ github.repository_owner }}
- name: Push to registry
if: github.event_name != 'pull_request'
run: |
make PUSH=true
reproducibility:
runs-on:
- self-hosted
- pkgs
if: ${{ contains(github.event.pull_request.labels.*.name, 'integration/reproducibility') }}
needs:
- default
services:
buildkitd:
image: moby/buildkit:buildx-stable-1
ports:
- 1234:1234
options: --privileged
volumes:
- /var/lib/buildkit/${{ github.repository }}:/var/lib/buildkit
- /usr/etc/buildkit/buildkitd.toml:/etc/buildkit/buildkitd.toml
steps:
- name: checkout
uses: actions/checkout@v3
- name: Unshallow
run: |
git fetch --prune --unshallow
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver: remote
endpoint: tcp://localhost:1234
append: |
- endpoint: tcp://buildkit-arm64.ci.svc.cluster.local:1234
platforms: linux/arm64
- name: reproducibility
run: |
make reproducibility-test
38 changes: 38 additions & 0 deletions .github/workflows/cron.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: weekly
concurrency:
group: ${{ github.event.label == null && github.head_ref || github.run_id }}
cancel-in-progress: true
on:
schedule:
- cron: '30 1 * * 1'
jobs:
reproducibility:
runs-on:
- self-hosted
- pkgs
services:
buildkitd:
image: moby/buildkit:buildx-stable-1
ports:
- 1234:1234
options: --privileged
volumes:
- /var/lib/buildkit/${{ github.repository }}:/var/lib/buildkit
- /usr/etc/buildkit/buildkitd.toml:/etc/buildkit/buildkitd.toml
steps:
- name: checkout
uses: actions/checkout@v3
- name: Unshallow
run: |
git fetch --prune --unshallow
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver: remote
endpoint: tcp://localhost:1234
append: |
- endpoint: tcp://buildkit-arm64.ci.svc.cluster.local:1234
platforms: linux/arm64
- name: reproducibility
run: |
make reproducibility-test
88 changes: 88 additions & 0 deletions .github/workflows/slack-notify.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: slack-notify
"on":
workflow_run:
workflows:
- default
- weekly
- integration
types:
- completed
jobs:
slack-notify:
runs-on:
- self-hosted
if: ${{ github.event.workflow_run.conclusion != 'skipped' }}
steps:
- name: Retrieve Workflow Run Info
id: retrieve-workflow-run-info
uses: potiuk/get-workflow-origin@v1_5
with:
sourceRunId: ${{ github.event.workflow_run.id }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Slack Notify
uses: slackapi/slack-github-action@v1
with:
channel-id: proj-talos-maintainers
payload: |
{
"attachments": [
{
"color": "${{ github.event.workflow_run.conclusion == 'success' && '#2EB886' || github.event.workflow_run.conclusion == 'failure' && '#A30002' || '#FFCC00' }}",
"fallback": "test",
"blocks": [
{
"type": "section",
"fields": [
{
"type": "mrkdwn",
"text": "${{ github.event.workflow_run.event == 'pull_request' && format('*Pull Request:* {0} (`{1}`)\n<{2}/pull/{3}|{4}>', github.repository, github.ref_name, github.event.repository.html_url, steps.retrieve-workflow-run-info.outputs.pullRequestNumber, github.event.workflow_run.display_title) || format('*Build:* {0}#{1} (`{2}`)', github.repository, github.sha, github.ref_name) }}"
},
{
"type": "mrkdwn",
"text": "*Status:*\n`${{ github.event.workflow_run.conclusion }}`"
}
]
},
{
"type": "section",
"fields": [
{
"type": "mrkdwn",
"text": "*Author:*\n`${{ github.actor }}`"
},
{
"type": "mrkdwn",
"text": "*Event:*\n`${{ github.event.workflow_run.event }}`"
}
]
},
{
"type": "divider"
},
{
"type": "actions",
"elements": [
{
"type": "button",
"text": {
"type": "plain_text",
"text": "Logs"
},
"url": "${{ github.event.workflow_run.html_url }}"
},
{
"type": "button",
"text": {
"type": "plain_text",
"text": "Commit"
},
"url": "${{ github.event.repository.html_url }}/commit/${{ github.sha }}"
}
]
}
]
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
6 changes: 0 additions & 6 deletions Pkgfile
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,6 @@ vars:
grep_sha256: 1db2aedde89d0dea42b16d9528f894c8d15dae4e190b59aecc78f5a951276eab
grep_sha512: f254a1905a08c8173e12fbdd4fd8baed9a200217fba9d7641f0d78e4e002c1f2a621152d67027d9b25f0bb2430898f5233dc70909d8464fd13d7dd9298e65c42

# renovate: datasource=git-tags depName=https://git.code.sf.net/p/gnu-efi/code.git
# we have to use 3.0.15 for now, since anything later breaks building sd-stub/sd-boot.
gnuefi_version: 3.0.15
gnuefi_sha256: 931a257b9c5c1ba65ff519f18373c438a26825f2db7866b163e96d1b168f20ea
gnuefi_sha512: 64d408b6d115bdc6eebae12fbd6cd907ed5f847f54e506c1e8f8ea5de38a95cf6fac66ab1009bd1d0bd2d54ad45ad598d29bcc303926a5899bf5cc25448cbb2f

# renovate: datasource=git-tags depName=https://gitlab.com/gnutls/gnutls.git
gnutls_version: 3.8.1
gnutls_sha256: ba8b9e15ae20aba88f44661978f5b5863494316fe7e722ede9d069fe6294829c
Expand Down
2 changes: 1 addition & 1 deletion dwarfutils/pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ steps:
sha256: "{{ .dwarfutils_sha256 }}"
sha512: "{{ .dwarfutils_sha512 }}"
env:
SOURCE_DATE_EPOCH: "1"
SOURCE_DATE_EPOCH: {{ .BUILD_ARG_SOURCE_DATE_EPOCH }}
prepare:
- |
tar -xvf dwarfutils.tar.xz --strip-components=1
Expand Down
1 change: 1 addition & 0 deletions sd-boot/pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ steps:
sha512: "{{ .systemd_sha512 }}"
env:
LD_LIBRARY_PATH: "/toolchain/lib"
SOURCE_DATE_EPOCH: {{ .BUILD_ARG_SOURCE_DATE_EPOCH }}
prepare:
- |
tar -xzf systemd.tar.gz --strip-components=1
Expand Down

0 comments on commit 9a05d12

Please sign in to comment.