Skip to content

Commit

Permalink
Merge pull request #5 from kashalls/perms-adjustment
Browse files Browse the repository at this point in the history
chore: seperate ci testing and building
  • Loading branch information
kashalls committed Dec 15, 2023
2 parents f71f218 + 2b154a8 commit bffca79
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
22 changes: 3 additions & 19 deletions .github/workflows/container-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,16 @@ on:
- "**"
tags:
- "v*.*.*"
pull_request:
branches:
- "main"

jobs:
# Run tests.
# See also https://docs.docker.com/docker-hub/builds/automated-testing/
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4

- name: Run tests
run: |
docker build . --file Dockerfile
# Push image to GitHub Packages.
# See also https://docs.docker.com/docker-hub/builds/
publish:
# Ensure test job passes before pushing image.
needs: test

runs-on: ubuntu-latest
if: github.event_name == 'push'
permissions:
contents: read
packages: write

permissions:
contents: read
Expand Down Expand Up @@ -62,7 +48,6 @@ jobs:

- name: Login to GitHub Container Registry
uses: docker/login-action@v3.0.0
if: github.event_name != 'pull_request'
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
Expand All @@ -73,6 +58,5 @@ jobs:
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
16 changes: 16 additions & 0 deletions .github/workflows/does-the-container-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Does The Container Build?

on:
pull_request:

jobs:
# Run tests.
# See also https://docs.docker.com/docker-hub/builds/automated-testing/
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4

- name: Run tests
run: |
docker build . --file Dockerfile

0 comments on commit bffca79

Please sign in to comment.