diff --git a/.github/workflows/docker-push.yml b/.github/workflows/docker-push.yml new file mode 100644 index 0000000..1f0bada --- /dev/null +++ b/.github/workflows/docker-push.yml @@ -0,0 +1,22 @@ +name: Docker Push +on: + release: + types: published +jobs: + Build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: crazy-max/ghaction-docker-buildx@v3 + with: + buildx-version: latest + qemu-version: latest + - name: Docker build + run: | + echo "${{ secrets.DOCKER }}" | docker login --username carlgo11 --password-stdin + docker buildx create --use + VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') + # Strip "v" prefix from tag name + [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') + echo VERSION=$VERSION + docker buildx build --platform linux/amd64,linux/arm/v7,linux/arm64 --rm --tag carlgo11/guest-portal:latest --tag carlgo11/guest-portal:$VERSION --push --compress . diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000..e57d42a --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,18 @@ +name: Docker Image CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Build the Docker image + run: docker build . --file Dockerfile --tag my-image-name:$(date +%s) diff --git a/.github/workflows/jekyll.yml b/.github/workflows/jekyll.yml index 1d22c29..2e83bab 100644 --- a/.github/workflows/jekyll.yml +++ b/.github/workflows/jekyll.yml @@ -1,6 +1,12 @@ name: Jekyll test -on: [push] +on: + push: + branches: master + paths: ./jekyll + pull_request: + branches: master + paths: ./jekyll jobs: Build_Test: @@ -15,6 +21,7 @@ jobs: restore-keys: ${{ runner.os }}-bundle- - uses: actions/setup-ruby@v1 - name: Install dependencies + working-directory: ./jekyll run: | bundle config set path 'vendor/cache' bundle config set cache_all true @@ -22,3 +29,4 @@ jobs: [ -d "vendor/cache" ] || { bundle package; } - name: Build Jekyll site run: bundle exec jekyll build + working-directory: ./jekyll