Skip to content

Commit

Permalink
- Updated GitHub Actions to their latest verion.
Browse files Browse the repository at this point in the history
- Use a GitHub Action to free space on GitHub on runners.
  • Loading branch information
jlesage committed Feb 14, 2024
1 parent 8b3128f commit f6bc286
Showing 1 changed file with 16 additions and 24 deletions.
40 changes: 16 additions & 24 deletions .github/workflows/build-baseimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,23 +45,15 @@ jobs:

steps:
- name: Free disk space
run: |
# Free disk space.
echo "::group::Before"
df -h /
echo "::endgroup::"
echo "::group::Removing unneeded softwares and files..."
for DIR in /usr/local/lib/android /usr/share/dotnet /opt/ghc
do
if [ -d "$DIR" ]; then
echo "Removing $DIR..."
sudo rm -r "$DIR"
fi
done
echo "::endgroup::"
echo "::group::After"
df -h /
echo "::endgroup::"
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: false

- name: Prepare
id: prep
Expand Down Expand Up @@ -128,23 +120,23 @@ jobs:
#echo "build_date=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup BATS
uses: mig4/setup-bats@v1

- name: Setup QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-aiction@v3
with:
platforms: arm,arm64,ppc64le,mips64,s390x

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
with:
driver-opts: network=host

- name: Build and push to local registry
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
push: true
pull: true
Expand Down Expand Up @@ -175,7 +167,7 @@ jobs:
- name: Login to DockerHub
if: ${{ steps.prep.outputs.is_release == 'yes' }}
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
Expand All @@ -189,7 +181,7 @@ jobs:
# - https://github.com/docker/buildx/issues/59
# - https://github.com/docker/build-push-action/issues/132
if: ${{ steps.prep.outputs.is_release == 'yes' }}
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
push: true
provenance: false
Expand Down Expand Up @@ -235,7 +227,7 @@ jobs:

- name: Dockerhub description
if: ${{ steps.prep.outputs.release_type == 'standard' }}
uses: peter-evans/dockerhub-description@v3
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
Expand Down

0 comments on commit f6bc286

Please sign in to comment.