fix: allow local act execution/testing
This commit is contained in:
@@ -17,11 +17,11 @@ jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ ( github.actor == github.repository_owner && github.event_name != 'pull_request' ) || ( github.actor != github.repository_owner ) }}
|
||||
if: ${{ ( github.actor == github.repository_owner && github.event_name != 'pull_request' ) || ( github.actor != github.repository_owner ) || env.ACT }}
|
||||
steps:
|
||||
- name: Login to GitHub Container Registry
|
||||
id: ghcr
|
||||
if: ${{ github.actor == github.repository_owner }}
|
||||
if: ${{ github.actor == github.repository_owner && !env.ACT }}
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
@@ -30,7 +30,7 @@ jobs:
|
||||
|
||||
- name: Login to Quay
|
||||
id: quay
|
||||
if: ${{ github.actor == github.repository_owner }}
|
||||
if: ${{ github.actor == github.repository_owner && !env.ACT }}
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: quay.io
|
||||
@@ -39,7 +39,7 @@ jobs:
|
||||
|
||||
- name: Login to Docker Hub
|
||||
id: dckr
|
||||
if: ${{ github.actor == github.repository_owner }}
|
||||
if: ${{ github.actor == github.repository_owner && !env.ACT }}
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USER }}
|
||||
@@ -66,7 +66,7 @@ jobs:
|
||||
DCKR_TAG: docker.io/${{ github.repository_owner }}/alpine:act
|
||||
with:
|
||||
context: .
|
||||
push: ${{ github.event_name != 'pull_request' && github.event_name != 'push' }}
|
||||
push: ${{ github.event_name != 'pull_request' && github.event_name != 'push' && !env.ACT }}
|
||||
file: ./linux/alpine/act/base/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||
tags: |
|
||||
@@ -87,14 +87,14 @@ jobs:
|
||||
- name: Build and push ${{ github.repository_owner }}/alpine:runner-${{ steps.print-date.outputs.date }}
|
||||
id: runner
|
||||
uses: docker/build-push-action@v2
|
||||
if: ${{ github.event_name != 'pull_request' && github.event_name != 'push' }}
|
||||
if: ${{ github.event_name != 'pull_request' && github.event_name != 'push' && !env.ACT }}
|
||||
env:
|
||||
GHCR_TAG: ghcr.io/${{ github.repository_owner }}/alpine:runner
|
||||
QUAY_TAG: quay.io/${{ github.repository_owner }}/alpine:runner
|
||||
DCKR_TAG: docker.io/${{ github.repository_owner }}/alpine:runner
|
||||
with:
|
||||
context: .
|
||||
push: ${{ github.event_name != 'pull_request' && github.event_name != 'push' }}
|
||||
push: ${{ github.event_name != 'pull_request' && github.event_name != 'push' && !env.ACT }}
|
||||
file: ./linux/alpine/act/runner/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||
tags: |
|
||||
|
||||
Reference in New Issue
Block a user