Skip to content

Commit

Permalink
Merge pull request #18 from berquist/simplify-gha
Browse files Browse the repository at this point in the history
Only use a single file for GitHub Actions workflow
  • Loading branch information
berquist authored Nov 15, 2023
2 parents 1a67280 + b6d8402 commit fb23e6b
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 186 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: py310img
---
name: build and push

on:
push:
Expand All @@ -12,7 +13,15 @@ on:

jobs:
docker:
name: build and push ${{ matrix.pyver }}
runs-on: ubuntu-latest
strategy:
matrix:
pyver:
- py37
- py38
- py39
- py310
steps:
-
name: Checkout
Expand All @@ -27,9 +36,9 @@ jobs:
flavor: |
latest=true
tags: |
type=schedule,pattern={{date 'YYYYMMDD'}},prefix=py310-
type=sha,prefix=py310-
type=edge,prefix=py310-
type=schedule,pattern={{date 'YYYYMMDD'}},prefix=${{ matrix.pyver }}-
type=sha,prefix=${{ matrix.pyver }}-
type=edge,prefix=${{ matrix.pyver }}-
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand All @@ -38,9 +47,9 @@ jobs:
uses: docker/setup-buildx-action@v2
-
name: Build and export to Docker
uses: docker/build-push-action@v3
uses: docker/build-push-action@v4
with:
context: py310
context: ${{ matrix.pyver }}
push: false
load: true
tags: ${{ steps.meta.outputs.tags }}
Expand All @@ -50,10 +59,11 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
when: ${{ github.event_name != 'pull_request'}}
-
name: Build and push
uses: docker/build-push-action@v3
uses: docker/build-push-action@v4
with:
context: py310
context: ${{ matrix.pyver }}
push: ${{ github.event_name != 'pull_request'}}
tags: ${{ steps.meta.outputs.tags }}
59 changes: 0 additions & 59 deletions .github/workflows/py37.yaml

This file was deleted.

59 changes: 0 additions & 59 deletions .github/workflows/py38.yaml

This file was deleted.

59 changes: 0 additions & 59 deletions .github/workflows/py39.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ shell:
docker run -it shivupa/cclib-ci:{{ tag }} bash

act:
act -W ./.github/workflows/{{ tag }}.yaml -P ubuntu-latest=catthehacker/ubuntu:act-latest
act -W ./.github/workflows/build_and_push.yaml -P ubuntu-latest=catthehacker/ubuntu:act-latest

0 comments on commit fb23e6b

Please sign in to comment.