From 2593a63e25f887f5fc842cb5b7bb7056c26ce940 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Darveau?= Date: Sat, 26 Jun 2021 16:30:03 -0400 Subject: [PATCH] add github workflow to automatically build a docker image --- .github/workflows/docker-image.yml | 18 +++++++++ .github/workflows/merge-upstream-master.yml | 42 +++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 .github/workflows/docker-image.yml create mode 100644 .github/workflows/merge-upstream-master.yml diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 0000000..c271515 --- /dev/null +++ b/.github/workflows/docker-image.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 flame:$(date +%s) diff --git a/.github/workflows/merge-upstream-master.yml b/.github/workflows/merge-upstream-master.yml new file mode 100644 index 0000000..639a34a --- /dev/null +++ b/.github/workflows/merge-upstream-master.yml @@ -0,0 +1,42 @@ +# .github/workflows/example.yml + +name: Fork Sync With Upstream + +on: + schedule: + # actually, ~5 minutes is the highest + # effective frequency you will get + - cron: '0 3 * * 1' + workflow_dispatch: #run manually + +jobs: + merge: + runs-on: ubuntu-latest + steps: + # Step 1: run a standard checkout action, provided by github + - name: Checkout main + uses: actions/checkout@v2 + with: + ref: master + # submodules: 'recursive' ### may be needed in your situation + + # Step 2: run this sync action - specify the upstream repo, upstream branch to sync with, and target sync branch + - name: Pull (Fast-Forward) upstream changes + id: sync + uses: aormsby/Fork-Sync-With-Upstream-action@v2.3 + with: + upstream_repository: pawelmalak/flame + upstream_branch: master + target_branch: master + git_pull_rebase_config: true + # git_pull_args: --ff-only # optional arg use, defaults to simple 'pull' + # github_token: ${{ secrets.GITHUB_TOKEN }} # optional, for accessing repos that require authentication + + # Step 3: Display a message if 'sync' step had new commits (simple test) + - name: Check for new commits + if: steps.sync.outputs.has_new_commits + run: echo "There were new commits." + + # Step 4: Print a helpful timestamp for your records (not required, just nice) + - name: Timestamp + run: date