mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-03-16.git
synced 2024-08-15 00:53:18 +00:00
Merge pull request #1691 from StuffNoOneCaresAbout/container-sha
Container sha without 2 builds
This commit is contained in:
commit
dd2a7f91cc
1 changed files with 17 additions and 5 deletions
22
.github/workflows/container-release.yml
vendored
22
.github/workflows/container-release.yml
vendored
|
@ -4,10 +4,13 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- "master"
|
- "master"
|
||||||
|
pull_request:
|
||||||
|
branches: "*"
|
||||||
|
schedule:
|
||||||
|
- cron: 0 0 * * *
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
@ -27,13 +30,22 @@ jobs:
|
||||||
username: ${{ secrets.QUAY_USERNAME }}
|
username: ${{ secrets.QUAY_USERNAME }}
|
||||||
password: ${{ secrets.QUAY_PASSWORD }}
|
password: ${{ secrets.QUAY_PASSWORD }}
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push for Push Event
|
||||||
|
if: github.ref == 'refs/heads/master'
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: docker/Dockerfile
|
file: docker/Dockerfile
|
||||||
|
labels: quay.expires-after=12w
|
||||||
push: true
|
push: true
|
||||||
tags: quay.io/invidious/invidious:latest
|
tags: quay.io/invidious/invidious:${{ github.sha }},quay.io/invidious/invidious:latest
|
||||||
|
|
||||||
- name: Image digest
|
- name: Build and push for Pull Request
|
||||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
if: github.ref != 'refs/heads/master'
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: docker/Dockerfile
|
||||||
|
labels: quay.expires-after=6w
|
||||||
|
push: true
|
||||||
|
tags: quay.io/invidious/invidious:${{ github.sha }}
|
||||||
|
|
Loading…
Reference in a new issue