mirror of
https://github.com/tanrax/RSSingle.git
synced 2024-11-22 06:45:41 +01:00
Merge pull request #34 from shymega/fix-container-builds-on-forks
Fix container builds on forks by using context vars
This commit is contained in:
commit
21610500db
8
.github/workflows/container.yml
vendored
8
.github/workflows/container.yml
vendored
@ -9,7 +9,7 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build-and-push-container-image:
|
build-and-push-container-image:
|
||||||
name: Build and push container image to Docker Hub and GHCR.io
|
name: Build and push container image to Docker Hub and GHCR.io
|
||||||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
if: ${{ github.event.workflow_run.conclusion == 'success' && github.repository == 'tanrax/RSSingle' }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
@ -19,7 +19,7 @@ jobs:
|
|||||||
id: build
|
id: build
|
||||||
uses: redhat-actions/buildah-build@v2
|
uses: redhat-actions/buildah-build@v2
|
||||||
with:
|
with:
|
||||||
image: tanrax/rssingle
|
image: ${{ github.repository }}
|
||||||
tags: latest
|
tags: latest
|
||||||
containerfiles: Dockerfile
|
containerfiles: Dockerfile
|
||||||
|
|
||||||
@ -29,7 +29,7 @@ jobs:
|
|||||||
image: ${{ steps.build.outputs.image }}
|
image: ${{ steps.build.outputs.image }}
|
||||||
tags: ${{ steps.build.outputs.tags }}
|
tags: ${{ steps.build.outputs.tags }}
|
||||||
registry: docker.io
|
registry: docker.io
|
||||||
username: tanrax
|
username: ${{ github.repository_owner }}
|
||||||
password: ${{ secrets.DOCKER_TOKEN }}
|
password: ${{ secrets.DOCKER_TOKEN }}
|
||||||
|
|
||||||
- name: Push container image to GHCR.io
|
- name: Push container image to GHCR.io
|
||||||
@ -38,7 +38,7 @@ jobs:
|
|||||||
image: ${{ steps.build.outputs.image }}
|
image: ${{ steps.build.outputs.image }}
|
||||||
tags: ${{ steps.build.outputs.tags }}
|
tags: ${{ steps.build.outputs.tags }}
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: tanrax
|
username: ${{ github.repository_owner }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user