Files
wg-ui/.github/workflows/push_master.yaml
T
Markus Viitamäki 758100558a Fix GitHub Action (no space left on device) (#53)
* Removing swap and cleaning up apt cache.

* List all docker images on machine, in order to do cleanup

* Cleanup old docker images

* Adding disk cleanup for master push
2020-04-14 21:28:08 +02:00

31 lines
980 B
YAML

name: Docker Image CI
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install buildah
run: |
sudo apt-get install -qq -y software-properties-common
sudo add-apt-repository -y ppa:projectatomic/ppa
sudo apt-get update -qq
sudo apt-get -qq -y install buildah
- name: free disk space
run: |
sudo swapoff -a
sudo rm -f /swapfile
sudo apt clean
docker rmi $(docker image ls -aq)
df -h
- name: Build & push the Docker image
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: |
buildah bud --format=docker --layers -t embarkstudios/wireguard-ui:latest -t embarkstudios/wireguard-ui:$GITHUB_SHA -f Dockerfile .
buildah push --creds $DOCKER_USERNAME:$DOCKER_PASSWORD --format=v2s2 embarkstudios/wireguard-ui