Skip to content

Commit

Permalink
Github action for publishing build from FiveAI fork
Browse files Browse the repository at this point in the history
  • Loading branch information
sedan07 committed Mar 16, 2021
1 parent e88a87d commit ee7acdf
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 11 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Publish Docker image
on:
push:
branches: [ "*" ]
tags: [ "*" ]

jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Get the version
id: get_version
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
-
name: Docker meta
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v1
with:
images: sedan07/cachet
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
push: true
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
build-args: |
cachet_ver=${{ steps.get_version.outputs.VERSION }}
-
name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
11 changes: 3 additions & 8 deletions .github/workflows/blank.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
# This is a basic workflow to help you get started with Actions

name: CI
name: Test

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
branches: [ "*" ]
pull_request:
branches: [ main ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
test:
# The type of runner that the job will run on
runs-on: ubuntu-latest

Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
FROM nginx:1.17.8-alpine
FROM nginx:1.17.10-alpine

EXPOSE 8000
CMD ["/sbin/entrypoint.sh"]

ARG cachet_ver
ARG archive_url

ENV cachet_ver ${cachet_ver:-2.4}
ENV archive_url ${archive_url:-https://github.com/cachethq/Cachet/archive/${cachet_ver}.tar.gz}
ENV cachet_ver ${cachet_ver:-2.5}
ENV archive_url ${archive_url:-https://github.com/fiveai/Cachet/archive/${cachet_ver}.tar.gz}

ENV COMPOSER_VERSION 1.9.0

Expand Down

0 comments on commit ee7acdf

Please sign in to comment.