diff --git a/.github/workflows/container-ci.yaml b/.github/workflows/container-ci.yaml index 3a214f3..21c22c6 100644 --- a/.github/workflows/container-ci.yaml +++ b/.github/workflows/container-ci.yaml @@ -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 steps: - name: Checkout Project @@ -58,7 +44,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 }} @@ -69,6 +54,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 }} \ No newline at end of file diff --git a/.github/workflows/does-the-container-build.yaml b/.github/workflows/does-the-container-build.yaml new file mode 100644 index 0000000..901895c --- /dev/null +++ b/.github/workflows/does-the-container-build.yaml @@ -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 \ No newline at end of file