Skip to content

Commit

Permalink
Build latest only on master, add commit sha tag
Browse files Browse the repository at this point in the history
  • Loading branch information
Perflyst authored Jan 21, 2021
1 parent a1aa40f commit a00453e
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/container-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
branches:
- "master"
pull_request:
branches: "*"

jobs:
release:
Expand All @@ -27,13 +29,22 @@ jobs:
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}

- name: Build and push
- name: Build and push latest tag
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v2
with:
context: .
file: docker/Dockerfile
push: true
tags: quay.io/invidious/invidious:latest

- name: Build and push commit sha tag
uses: docker/build-push-action@v2
with:
context: .
file: docker/Dockerfile
push: true
tags: quay.io/invidious/invidious:${{ github.sha }}

- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}

0 comments on commit a00453e

Please sign in to comment.