Skip to content

Commit 456454a

Browse files
committed
Remove /usr/local/lib/android and /usr/share/dotnet to make space since we aren't building for either.
Add action to manually delete old workflows
1 parent a53105d commit 456454a

File tree

2 files changed

+33
-8
lines changed

2 files changed

+33
-8
lines changed

.github/workflows/build_push.yaml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
pull_request:
88
branches:
99
- '*'
10+
workflow_dispatch:
1011

1112
jobs:
1213
ShellCheck:
@@ -21,6 +22,10 @@ jobs:
2122
runs-on: ubuntu-latest
2223
needs: ShellCheck
2324
steps:
25+
- name: Make Space
26+
run: |
27+
sudo rm -rf /usr/local/lib/android # will release about 10 GB if you don't need Android
28+
sudo rm -rf /usr/share/dotnet # will release about 20GB if you don't need .NET
2429
- name: Checkout
2530
if: success()
2631
id: checkout
@@ -44,24 +49,22 @@ jobs:
4449
id: prepare
4550
run: |
4651
echo ::set-output name=docker_platforms::linux/amd64,linux/386
47-
echo ::set-output name=docker_username::miigotu
48-
echo ::set-output name=github_image::ghcr.io/${GITHUB_REPOSITORY,,}/ps3dev
4952
VERSION_TAG=${GITHUB_REF#refs/*/}
5053
echo ::set-output name=version::${VERSION_TAG%/merge}
5154
# - name: Login to DockerHub
5255
# if: success()
5356
# id: login_docker
5457
# uses: docker/login-action@v1
5558
# with:
56-
# username: ${{ secrets.DOCKERHUB_USERNAME }}
57-
# password: ${{ secrets.DOCKERHUB_TOKEN }}
59+
# username: ${{ secrets.DOCKER_USERNAME }}
60+
# password: ${{ secrets.DOCKER_PASSWORD }}
5861
- name: Login to GitHub Container Registry
5962
if: success()
6063
id: login_github
6164
uses: docker/login-action@v1
6265
with:
6366
registry: ghcr.io
64-
username: ${{ steps.prepare.outputs.docker_username }}
67+
username: ${{ github.repository_owner }}
6568
password: ${{ secrets.GITHUB_TOKEN }}
6669
- name: Build and push (master)
6770
if: success() && steps.prepare.outputs.version == 'master' && github.event_name != 'pull_request'
@@ -72,8 +75,10 @@ jobs:
7275
platforms: ${{ steps.prepare.outputs.docker_platforms }}
7376
push: true
7477
tags: |
75-
${{ steps.prepare.outputs.github_image }}:master
76-
${{ steps.prepare.outputs.github_image }}:latest
78+
ghcr.io/ps3dev/ps3dev:master
79+
ghcr.io/ps3dev/ps3dev:latest
80+
# ps3dev/ps3dev:master
81+
# ps3dev/ps3dev:latest
7782
- name: Build and push (development)
7883
if: success() && steps.prepare.outputs.version != 'master'
7984
id: build_push_development
@@ -83,7 +88,8 @@ jobs:
8388
platforms: ${{ steps.prepare.outputs.docker_platforms }}
8489
push: true
8590
tags: |
86-
${{ steps.prepare.outputs.github_image }}:${{ steps.prepare.outputs.version }}
91+
ghcr.io/ps3dev/ps3dev:${{ steps.prepare.outputs.version }}
92+
# ps3dev/ps3dev:${{ steps.prepare.outputs.version }}
8793
cache-from: type=local,src=/tmp/.buildx-cache
8894
cache-to: type=local,dest=/tmp/.buildx-cache-new
8995
- name: Move cache

.github/workflows/delete_old.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Delete old workflow runs
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
days:
6+
description: 'Number of days.'
7+
required: true
8+
default: 90
9+
10+
jobs:
11+
del_runs:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Delete workflow runs
15+
uses: Mattraks/delete-workflow-runs@main
16+
with:
17+
token: ${{ secrets.GITHUB_TOKEN }}
18+
repository: ${{ github.repository }}
19+
retain_days: ${{ github.event.inputs.days }}

0 commit comments

Comments
 (0)