8000 gha: use concurrency keyword to cancel previous action runs by csegarragonz · Pull Request #815 · faasm/faasm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

gha: use concurrency keyword to cancel previous action runs #815

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

Merged
merged 2 commits into from
Jan 16, 2024
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
12 changes: 5 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,12 @@ defaults:
run:
shell: bash

jobs:
# Cancel previous running actions for the same PR
cancel_previous:
runs-on: ubuntu-latest
steps:
- name: Cancel Workflow Action
uses: styfle/cancel-workflow-action@0.11.0
# Cancel previous running actions for the same PR
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
checks:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
Expand Down
18 changes: 5 additions & 13 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
black==22.3.0
breathe==4.32.0
docker==5.0.0
black>=23.12.0
breathe>=4.35.0
faasmctl==0.24.0
flake8==3.9.2
gunicorn==20.1.0
flake8>=7.0.0
invoke>=2.0.0
myst-parser==0.17.2
numpy==1.22.0
packaging>=21.3
pydot==1.4.2
psutil==5.9.3
myst_parser>=2.0.0
PyGithub==1.55
redis==4.5.4
six==1.16.0
sphinx-rtd-theme==1.0.0
sphinx-rtd-theme>=2.0.0
6 changes: 2 additions & 4 deletio 10000 ns tasks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from . import codegen
from . import dev
from . import disas
from . import docker_tasks
from . import docker
from . import docs
from . import flame
from . import format_code
Expand All @@ -20,6 +20,7 @@
codegen,
dev,
disas,
docker,
docs,
flame,
format_code,
Expand All @@ -31,6 +32,3 @@
tests,
wast,
)

# Custom names
ns.add_collection(ns.from_module(docker_tasks), name="docker")
22 changes: 0 additions & 22 deletions tasks/docker_tasks.py → tasks/docker.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
from copy import copy
from docker import from_env as from_docker_env
from faasmtools.docker import ACR_NAME
from invoke import task
from os import environ
from os.path import join
from packaging import version
from subprocess import run, PIPE
from tasks.util.env import (
FAASM_SGX_MODE_DISABLED,
Expand Down Expand Up @@ -207,23 +205,3 @@ def pull(ctx, c):
check=True,
cwd=PROJ_ROOT,
)


@task
def delete_old(ctx):
"""
Deletes old Docker images
"""
faasm_ver = get_version()

dock = from_docker_env()
images = dock.images.list()
for image in images:
for t in image.tags:
if not t.startswith("{}".format(ACR_NAME)):
continue

tag_ver = t.split(":")[-1]
if version.parse(tag_ver) < version.parse(faasm_ver):
print("Removing old image: {}".format(t))
dock.images.remove(t, force=True)
127 changes: 0 additions & 127 deletions tasks/util/exec_graph.py

This file was deleted.

26 changes: 0 additions & 26 deletions tasks/util/http.py

This file was deleted.

109 changes: 0 additions & 109 deletions tasks/util/memory.py

This file was deleted.

0