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

workflow: dogfood & tidy #1165

Merged
merged 6 commits into from
Sep 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions .github/workflows/gitlab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ jobs:
services:
gitlab:
image: docker://gitlab/gitlab-ce
ports:
- 8000:8000
ports: [8000:8000]
env:
GITLAB_OMNIBUS_CONFIG: |
external_url 'http://localhost:8000/gitlab'
Expand All @@ -21,8 +20,7 @@ jobs:
}
'
steps:
- name: Checkout repository
uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Configure credentials
run: |
docker exec ${{ job.services.gitlab.id }} bin/gitlab-rails runner "
Expand Down Expand Up @@ -60,8 +58,7 @@ jobs:
--request GET \
| jq -r .id \
| xargs -0 printf "::set-output name=hash::%s"
- name: Install dependencies
run: npm ci
- run: npm ci
- name: Run cml-send-comment
run: |
node bin/cml.js send-comment \
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/images.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
on:
workflow_call:
inputs:
test:
required: false
type: boolean
jobs:
images:
runs-on: ubuntu-latest
Expand All @@ -27,7 +24,7 @@ jobs:
base: 1
dvc: 2
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}
fetch-depth: 0
Expand Down Expand Up @@ -73,7 +70,7 @@ jobs:
)"
echo ::set-output name=tags::"${TAGS//$'\n'/'%0A'}"
- uses: docker/setup-buildx-action@v1
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key:
Expand Down
20 changes: 11 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,25 @@ jobs:
if: github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: |
git config --global user.name Olivaw[bot]
git config --global user.email [email protected]
- uses: actions/checkout@v3
- name: Bump version
run: |
npm install -g .
cml ci
git checkout -b bump/$(npm version ${{ github.event.inputs.bump }})
- name: Create PR
run: |
git push --set-upstream origin --follow-tags HEAD
gh pr create --title "Bump version to $(git describe --tags)" --body "Approve me 🤖"
gh pr merge --squash --auto
cml pr create --title "Bump version to $(git describe --tags)" --body "Approve me 🤖" --squash
env:
GITHUB_TOKEN: ${{ secrets.ADMIN_GITHUB_TOKEN }}
release:
if: github.event.pull_request.merged && startsWith(github.head_ref, 'bump/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run:
gh release create --generate-notes {--title=CML\ ,}$(basename ${{
github.head_ref }})
gh release create --draft --generate-notes {--title=CML\ ,}$(basename
0x2b3bfa0 marked this conversation as resolved.
Show resolved Hide resolved
${{ github.head_ref }})
casperdcl marked this conversation as resolved.
Show resolved Hide resolved
env:
GITHUB_TOKEN: ${{ secrets.ADMIN_GITHUB_TOKEN }}
12 changes: 6 additions & 6 deletions .github/workflows/test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ jobs:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}
- name: check that npm lock file is on version 2
- name: npm lock file is v2
run: jq --exit-status .lockfileVersion==2 < package-lock.json
lint:
needs: authorize
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}
- uses: actions/setup-node@v2
Expand All @@ -38,7 +38,7 @@ jobs:
needs: authorize
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}
- uses: actions/setup-node@v2
Expand Down Expand Up @@ -69,7 +69,7 @@ jobs:
system: [ubuntu, macos, windows]
runs-on: ${{ matrix.system }}-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}
- if: matrix.system == 'windows'
Expand All @@ -91,7 +91,7 @@ jobs:
needs: [lint, test, test-os]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}
- uses: actions/setup-node@v2
Expand All @@ -106,7 +106,7 @@ jobs:
- name: install ldid
run: |
sudo apt install --yes libplist-dev
git clone --branch v2.1.5 git://git.saurik.com/ldid.git
git clone --branch v2.1.5 git://git.saurik.com/ldid.git
sudo g++ -pipe -o /usr/bin/ldid ldid/ldid.cpp -I. -x c ldid/{lookup2.c,sha1.h} -lplist -lcrypto
- id: build
name: build
Expand Down
18 changes: 6 additions & 12 deletions .github/workflows/trigger-external.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,20 @@ on:
type: string
required: true
release:
types:
- published
types: [published]
pull_request:
branches:
- master
branches: [master]
jobs:
pr:
if: ${{ github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
strategy:
matrix:
repos:
- cml-playground
repos: [cml-playground]
steps:
- name: Trigger external actions
run: |
curl --silent --show-error \
--request POST \
curl --silent --show-error --request POST \
--header "Authorization: token ${{ secrets.TEST_GITHUB_TOKEN }}" \
--header "Accept: application/vnd.github.v3+json" \
--url "https://api.github.com/repos/iterative/${{ matrix.repos }}/dispatches" \
Expand All @@ -36,13 +32,11 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
repos:
- cml-playground
repos: [cml-playground]
steps:
- name: Trigger external actions
run: |
curl --silent --show-error \
--request POST \
curl --silent --show-error --request POST \
--header "Authorization: token ${{ secrets.TEST_GITHUB_TOKEN }}" \
--header "Accept: application/vnd.github.v3+json" \
--url "https://api.github.com/repos/iterative/${{ matrix.repos }}/dispatches" \
Expand Down