Browse Source

Add first version of gh action

Mark Szepieniec 3 years ago
parent
commit
daa0894bda
1 changed files with 45 additions and 0 deletions
  1. 45 0
      .github/workflows/main.yml

+ 45 - 0
.github/workflows/main.yml

@@ -0,0 +1,45 @@
+# This is a basic workflow to help you get started with Actions
+
+name: build-resume
+
+# Controls when the action will run. 
+on:
+  # Triggers the workflow on push or pull request events but only for the master branch
+  push:
+    branches: [ master ]
+
+  # 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:
+    env:
+      - DOCKER_HOST: tcp://docker:2375/
+      - DOCKER_DRIVER: overlay2
+    # The type of runner that the job will run on
+    runs-on: ubuntu-latest
+    container:
+      image: docker/compose:1.22.0
+      options: --entrypoint ["/bin/sh", "-c"]
+    services:
+      dind:
+        image: docker:dind
+
+    # Steps represent a sequence of tasks that will be executed as part of the job
+    steps:
+      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
+      - uses: actions/checkout@v2
+
+      - name: Install packages and build resume
+        run: docker-compose up -d
+
+      - name: Upload a Build Artifact
+        uses: actions/upload-artifact@v2.2.3
+        with:
+          # Artifact name
+          name: Resume PDF # optional, default is artifact
+          # A file, directory or wildcard pattern that describes what to upload
+          path: output/*.pdf
+