Skip to content

Commit

Permalink
Update CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
t-ho committed Jun 15, 2020
1 parent 7f3cdc7 commit ba364fb
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions .github/workflows/dockerimage.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Docker Image CI

on: [push, pull_request]
on:
release:
types:
- created

jobs:

Expand All @@ -9,6 +12,18 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master
- name: Build the Docker image
run: docker build . --file Dockerfile --tag nginx-le:$(date +%s)
- uses: actions/checkout@v2
- name: Get release version
run: echo ::set-env name=RELEASE_VERSION::$(echo ${GITHUB_REF:10})

- uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: 0x8861/nginx-le
tag_with_sha: true
path: .
dockerfile: Dockerfile
tags: latest,stable,${{ env.RELEASE_VERSION }}
always_pull: true
push: true

0 comments on commit ba364fb

Please sign in to comment.