Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change docker tag behaviour on release #70 #82

Merged
merged 1 commit into from
Dec 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: Docker
on:
push:
branches: [ master ]

release:
types: [ published ]
jobs:

build:
name: Test and build container image
runs-on: ubuntu-latest
Expand All @@ -25,7 +25,18 @@ jobs:
- name: Test
run: go test -v -timeout 30s -race ./...

- name: Build and push docker image
- name: Build and push edge docker image
if: github.event_name == push
# Recommended to refer to an explicit sha in combination with secrets
uses: docker/build-push-action@92e71463491f2d026a477188b8ad3a0fdd9d672c #v1
with:
username: '${{ secrets.DOCKER_USERNAME }}'
password: '${{ secrets.DOCKER_PASSWORD }}'
repository: avenga/couper
add_git_labels: true
tags: edge
- name: Build and push docker image with specific tag
if: github.event_name == release
# Recommended to refer to an explicit sha in combination with secrets
uses: docker/build-push-action@92e71463491f2d026a477188b8ad3a0fdd9d672c #v1
with:
Expand All @@ -34,3 +45,5 @@ jobs:
repository: avenga/couper
tag_with_ref: true
add_git_labels: true
tags: ${{ github.ref }},latest
push: ${{ startsWith(github.ref, 'refs/tags/') }}
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Release

on:
release:
types: [created,edited,prereleased,released]
types: [released]

jobs:
releases-matrix:
Expand Down