Skip to content

Commit

Permalink
Use github actions instead of travis
Browse files Browse the repository at this point in the history
  • Loading branch information
CristianHenzel committed Oct 23, 2021
1 parent affb5a5 commit 1b8aba6
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 21 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: "Build and push"

on:
push:
branches: [ main ]

jobs:
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v2

- name: Login to GitHub Container Registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build
uses: docker/build-push-action@v2
with:
load: true
tags: ghcr.io/cristianhenzel/docker-mkiso:latest
context: ./
file: ./Dockerfile
cache-from: ghcr.io/cristianhenzel/docker-mkiso:latest

- name: Push
run: docker push "ghcr.io/cristianhenzel/docker-mkiso:latest"
41 changes: 41 additions & 0 deletions .github/workflows/iso.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: "Create ISO"

on:
schedule:
- cron: '0 0,12 * * *'

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y%m%d-%H%M%S')"

- name: Create min ISO
run: |
docker run -i --rm -v /data:/data \
-e MKISO_ADD_PACKAGES="curl nano openssh-server" \
-e MKISO_COUNTRYCODE="ro" \
-e MKISO_FILE_NAME="debian-min.iso" \
-e MKISO_ROOT_PASSWORD="root" \
-e MKISO_TIMEZONE="Europe\/Bucharest" \
ghcr.io/cristianhenzel/docker-mkiso:latest
- name: Create dev ISO
run: |
docker run -i --rm -v /data:/data \
-e MKISO_ADD_PACKAGES="cifs-utils ctop curl docker.io docker-compose git htop make nano openssh-server python3-pip wget" \
-e MKISO_COUNTRYCODE="ro" \
-e MKISO_FILE_NAME="debian-dev.iso" \
-e MKISO_ROOT_PASSWORD="root" \
-e MKISO_TIMEZONE="Europe\/Bucharest" \
ghcr.io/cristianhenzel/docker-mkiso:latest
- name: Release ISOs
uses: softprops/action-gh-release@v1
with:
files: /data/*.iso
name: ${{ steps.date.outputs.date }}
tag_name: ${{ steps.date.outputs.date }}
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ docker run -it --rm -v /data:/data \
-e MKISO_COUNTRYCODE="ro" \
-e MKISO_ROOT_PASSWORD="root" \
-e MKISO_TIMEZONE="Europe\/Bucharest" \
hecristi/mkiso:latest
ghcr.io/cristianhenzel/docker-mkiso:latest
```

## TODO:
Expand Down

0 comments on commit 1b8aba6

Please sign in to comment.