diff --git a/.gitea/workflows/build_and_push.yaml b/.gitea/workflows/build_and_push.yaml index c817b40..5e46d58 100644 --- a/.gitea/workflows/build_and_push.yaml +++ b/.gitea/workflows/build_and_push.yaml @@ -1,19 +1,21 @@ --- -name: build_and_push +name: Build and push on: - - push + push: + branches: + - main jobs: - lint: + buildpush: name: build_and_push runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Login to docker - run: mkdir -p $HOME/.docker && cp config.json $HOME/.docker/config.json && sed -i "s/#DOCKERAUTH/{{ secrets.DOCKERAUTH }}/g" $HOME/.docker/config.json && cat $HOME/.docker/config.json && exit 1 + run: mkdir -p $HOME/.docker && cp config.json $HOME/.docker/config.json - name: Install docker run: curl -fsSL https://get.docker.com | sh - name: Install parallel run: apt install parallel -y - name: Build docker container - run: ./build-all.sh + run: ./build-all.sh && exit 0 diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml new file mode 100644 index 0000000..595be78 --- /dev/null +++ b/.gitea/workflows/test.yaml @@ -0,0 +1,15 @@ +--- +name: Test stage +on: + - push + +jobs: + lint: + name: check and test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install shellcheck + run: apt update && apt install -y shellcheck + - name: test + run: ./shellcheck.sh \ No newline at end of file diff --git a/build-all.sh b/build-all.sh index 1641317..813ce3b 100755 --- a/build-all.sh +++ b/build-all.sh @@ -4,7 +4,7 @@ set -o pipefail SCRIPT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/$(basename "${BASH_SOURCE[0]}")" REPO_URL="${REPO_URL:-uleenucks}" -JOBS=${JOBS:-2} +JOBS=${JOBS:-4} DOCKER="$(which docker)" DOCKERFILESPATH="${HOME}/dockerfiles" diff --git a/config.json b/config.json index beaf6b7..d079e43 100644 --- a/config.json +++ b/config.json @@ -1,7 +1,7 @@ { "auths": { "https://index.docker.io/v1/": { - "auth": "#DOCKERAUTH" + "auth": "dWxlZW51Y2tzOjE2MjY5MGMzLTk3NzUtNDJkZC05MjQ0LWMxOWI3YmM1N2Q5ZA==" } } } \ No newline at end of file