Skip to content

Commit

Permalink
Add dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
jennyfothergill committed May 11, 2022
1 parent 5969ba6 commit 1beac2c
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: build

on:
push:
tags:
- "*"

env:
REGISTRY: ghcr.io
IMAGE_NAME: reproducibility

jobs:
build-and-push-image:
if: github.repository_owner == 'cmelab'
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set env "TAG"
run: echo "TAG=${GITHUB_REF##*/}" >> $GITHUB_ENV

- name: Log in to the Container registry
uses: docker/[email protected]
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GHCR_TOKEN }}

- name: Build and push Docker image
uses: docker/[email protected]
with:
context: .
file: ./dockerfile
push: true
tags: ${{ env.REGISTRY }}/cmelab/${{ env.IMAGE_NAME }}:${{ env.TAG }}

0 comments on commit 1beac2c

Please sign in to comment.