Split Git package installation
This commit is contained in:
parent
c0b17a06ef
commit
1fa09d1621
2 changed files with 44 additions and 35 deletions
29
.forgejo/workflows/composite/apt-install-from/action.yaml
Normal file
29
.forgejo/workflows/composite/apt-install-from/action.yaml
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
inputs:
|
||||||
|
packages:
|
||||||
|
description: 'Packages to install'
|
||||||
|
required: true
|
||||||
|
release:
|
||||||
|
description: 'Release to install from'
|
||||||
|
default: testing
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- name: setup apt package source
|
||||||
|
run: |
|
||||||
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
|
echo "deb http://deb.debian.org/debian/ ${RELEASE} main" > "/etc/apt/sources.list.d/${RELEASE}.list"
|
||||||
|
env:
|
||||||
|
RELEASE: ${{inputs.release}}
|
||||||
|
- name: install packages
|
||||||
|
run: |
|
||||||
|
apt-get update -qq
|
||||||
|
apt-get -q install -qq -y ${PACKAGES}
|
||||||
|
env:
|
||||||
|
PACKAGES: ${{inputs.packages}}
|
||||||
|
- name: remove temporary package list to prevent using it in other steps
|
||||||
|
run: |
|
||||||
|
rm "/etc/apt/sources.list.d/${RELEASE}.list"
|
||||||
|
apt-get update -qq
|
||||||
|
env:
|
||||||
|
RELEASE: ${{inputs.release}}
|
|
@ -60,13 +60,9 @@ jobs:
|
||||||
- uses: https://code.forgejo.org/actions/checkout@v3
|
- uses: https://code.forgejo.org/actions/checkout@v3
|
||||||
- uses: ./.forgejo/workflows/composite/setup-env
|
- uses: ./.forgejo/workflows/composite/setup-env
|
||||||
- name: install git >= 2.42
|
- name: install git >= 2.42
|
||||||
run: |
|
uses: ./.forgejo/workflows/composite/apt-install-from
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
with:
|
||||||
echo deb http://deb.debian.org/debian/ testing main > /etc/apt/sources.list.d/testing.list
|
packages: git
|
||||||
apt-get update -qq
|
|
||||||
apt-get -q install -qq -y git
|
|
||||||
rm /etc/apt/sources.list.d/testing.list
|
|
||||||
apt-get update -qq
|
|
||||||
- name: test release-notes-assistant.sh
|
- name: test release-notes-assistant.sh
|
||||||
run: |
|
run: |
|
||||||
apt-get -q install -qq -y jq
|
apt-get -q install -qq -y jq
|
||||||
|
@ -108,13 +104,9 @@ jobs:
|
||||||
- uses: https://code.forgejo.org/actions/checkout@v3
|
- uses: https://code.forgejo.org/actions/checkout@v3
|
||||||
- uses: ./.forgejo/workflows/composite/setup-env
|
- uses: ./.forgejo/workflows/composite/setup-env
|
||||||
- name: install git >= 2.42
|
- name: install git >= 2.42
|
||||||
run: |
|
uses: ./.forgejo/workflows/composite/apt-install-from
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
with:
|
||||||
echo deb http://deb.debian.org/debian/ testing main > /etc/apt/sources.list.d/testing.list
|
packages: git
|
||||||
apt-get update -qq
|
|
||||||
apt-get -q install -qq -y git
|
|
||||||
rm /etc/apt/sources.list.d/testing.list
|
|
||||||
apt-get update -qq
|
|
||||||
- uses: ./.forgejo/workflows/composite/build-backend
|
- uses: ./.forgejo/workflows/composite/build-backend
|
||||||
- run: |
|
- run: |
|
||||||
su forgejo -c 'make test-remote-cacher test-check'
|
su forgejo -c 'make test-remote-cacher test-check'
|
||||||
|
@ -143,13 +135,9 @@ jobs:
|
||||||
- uses: https://code.forgejo.org/actions/checkout@v3
|
- uses: https://code.forgejo.org/actions/checkout@v3
|
||||||
- uses: ./.forgejo/workflows/composite/setup-env
|
- uses: ./.forgejo/workflows/composite/setup-env
|
||||||
- name: install dependencies & git >= 2.42
|
- name: install dependencies & git >= 2.42
|
||||||
run: |
|
uses: ./.forgejo/workflows/composite/apt-install-from
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
with:
|
||||||
echo deb http://deb.debian.org/debian/ testing main > /etc/apt/sources.list.d/testing.list
|
packages: git git-lfs
|
||||||
apt-get update -qq
|
|
||||||
apt-get install --no-install-recommends -qq -y git git-lfs
|
|
||||||
rm /etc/apt/sources.list.d/testing.list
|
|
||||||
apt-get update -qq
|
|
||||||
- uses: ./.forgejo/workflows/composite/build-backend
|
- uses: ./.forgejo/workflows/composite/build-backend
|
||||||
- run: |
|
- run: |
|
||||||
su forgejo -c 'make test-mysql-migration test-mysql'
|
su forgejo -c 'make test-mysql-migration test-mysql'
|
||||||
|
@ -179,13 +167,9 @@ jobs:
|
||||||
- uses: https://code.forgejo.org/actions/checkout@v3
|
- uses: https://code.forgejo.org/actions/checkout@v3
|
||||||
- uses: ./.forgejo/workflows/composite/setup-env
|
- uses: ./.forgejo/workflows/composite/setup-env
|
||||||
- name: install dependencies & git >= 2.42
|
- name: install dependencies & git >= 2.42
|
||||||
run: |
|
uses: ./.forgejo/workflows/composite/apt-install-from
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
with:
|
||||||
echo deb http://deb.debian.org/debian/ testing main > /etc/apt/sources.list.d/testing.list
|
packages: git git-lfs
|
||||||
apt-get update -qq
|
|
||||||
apt-get install --no-install-recommends -qq -y git git-lfs
|
|
||||||
rm /etc/apt/sources.list.d/testing.list
|
|
||||||
apt-get update -qq
|
|
||||||
- uses: ./.forgejo/workflows/composite/build-backend
|
- uses: ./.forgejo/workflows/composite/build-backend
|
||||||
- run: |
|
- run: |
|
||||||
su forgejo -c 'make test-pgsql-migration test-pgsql'
|
su forgejo -c 'make test-pgsql-migration test-pgsql'
|
||||||
|
@ -204,13 +188,9 @@ jobs:
|
||||||
- uses: https://code.forgejo.org/actions/checkout@v3
|
- uses: https://code.forgejo.org/actions/checkout@v3
|
||||||
- uses: ./.forgejo/workflows/composite/setup-env
|
- uses: ./.forgejo/workflows/composite/setup-env
|
||||||
- name: install dependencies & git >= 2.42
|
- name: install dependencies & git >= 2.42
|
||||||
run: |
|
uses: ./.forgejo/workflows/composite/apt-install-from
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
with:
|
||||||
echo deb http://deb.debian.org/debian/ testing main > /etc/apt/sources.list.d/testing.list
|
packages: git git-lfs
|
||||||
apt-get update -qq
|
|
||||||
apt-get install --no-install-recommends -qq -y git git-lfs
|
|
||||||
rm /etc/apt/sources.list.d/testing.list
|
|
||||||
apt-get update -qq
|
|
||||||
- uses: ./.forgejo/workflows/composite/build-backend
|
- uses: ./.forgejo/workflows/composite/build-backend
|
||||||
- run: |
|
- run: |
|
||||||
su forgejo -c 'make test-sqlite-migration test-sqlite'
|
su forgejo -c 'make test-sqlite-migration test-sqlite'
|
||||||
|
|
Loading…
Reference in a new issue