Skip to content

Commit

Permalink
Reordered and renamed tem_dockerbuild.yml. This workflow is now only …
Browse files Browse the repository at this point in the history
…triggered when the corresponding Dockerfile changes.
  • Loading branch information
fredericpoitevin committed Nov 3, 2021
1 parent dce3d96 commit e7ab82e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@ name: "Building TEM simulator container"

on:
push:
branches: [ master, temsim-container ]
branches: [master,temsim-container]
paths:
- 'docker/TEM-simulator/Dockerfile'

pull_request:
branch: [ master, temsim-container ]
branch: [master]
paths:
- 'docker/TEM-simulator/Dockerfile'

jobs:
build:
Expand All @@ -15,6 +19,10 @@ jobs:
- name: Check Out Repo
uses: actions/checkout@v2

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1

- name: Cache Docker layers
uses: actions/cache@v2
with:
Expand All @@ -29,10 +37,6 @@ jobs:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1

- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
Expand All @@ -44,5 +48,6 @@ jobs:
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/simspi-temsimulator:latest
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache

- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
run: echo ${{ steps.docker_build.outputs.digest }}
1 change: 0 additions & 1 deletion docker/TEM-simulator/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# syntax=docker/dockerfile:1
FROM ubuntu:18.04

WORKDIR /work
Expand Down

0 comments on commit e7ab82e

Please sign in to comment.