-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* I am so confused * Ok, if this doesn't work, we just need three workflows * Don't think I need to do this, but who knows * We've done a lot * Dug * Ok, hold on * Let's try this * Thoroughly confused * Ok, hold on * Ok, we can probably skip wider ruff formatting for now * Do we need this now? I forget * We probably need this * I don't get it * Is this a local thing? * Our CI is gooderer * Don't need that
- Loading branch information
Showing
43 changed files
with
1,151 additions
and
1,785 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: Atils Build and Publish | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- 'atils/**' | ||
- '.github/workflows/atils-run-ci.yaml' | ||
|
||
jobs: | ||
build-and-publish-docker-image: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Get atils version | ||
run: echo "VERSION=$(grep -E '^version = "' atils/pyproject.toml | cut -d'"' -f2)" >> $GITHUB_ENV | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Build and publish atils image | ||
uses: docker/build-push-action@v6 | ||
with: | ||
push: true | ||
file: atils/Dockerfile | ||
context: atils | ||
tags: | | ||
aidanhilt/atils:${{ env.VERSION }} | ||
aidanhilt/atils:latest | ||
platforms: linux/amd64, linux/arm64 | ||
|
||
build-and-publish-python-package: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup python with pyproject.toml-specified version | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version-file: 'atils/pyproject.toml' | ||
- name: Install and configure Poetry | ||
uses: snok/install-poetry@v1 | ||
- name: Install dependencies | ||
run: poetry install -n -vv | ||
working-directory: atils | ||
- name: Build and publish package to PyPI | ||
run: | | ||
poetry config pypi-token.pypi $PYPI_API_TOKEN | ||
poetry build | ||
poetry publish -n -vv | ||
working-directory: atils | ||
env: | ||
PYPI_API_TOKEN: ${{ secrets.ATILS_PYPI_TOKEN }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# This is just an action we use to run local build+pushes | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
image: | ||
description: "The directory name of the custom image to build" | ||
tags: | ||
description: "The tags to push to our repo" | ||
|
||
jobs: | ||
build-and-publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Build and publish custom image | ||
uses: docker/build-push-action@v6 | ||
with: | ||
push: true | ||
file: custom-images/${{ inputs.image }}/Dockerfile | ||
context: custom-images/${{ inputs.image }} | ||
tags: ${{ inputs.tags }} | ||
platforms: linux/amd64, linux/arm64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: Build Custom Images on Push to Branch | ||
|
||
on: | ||
push: | ||
branches: | ||
- '!master' | ||
paths: | ||
- 'custom-images/**' | ||
- '.github/workflows/custom-containers-run-ci.yaml' | ||
- '!custom-images/docs/**' | ||
|
||
jobs: | ||
generate-matrix: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
changed_directories: ${{ steps.set-output.outputs.changed_directories }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Get changed files | ||
id: changed-files | ||
uses: tj-actions/changed-files@v42.0.7 | ||
with: | ||
dir_names: true | ||
json: true | ||
quotepath: false | ||
dir_names_exclude_current_dir: true | ||
files: | | ||
custom-images/** | ||
!custom-images/docs/** | ||
- name: Set matrix-formatted output | ||
id: set-output | ||
run: echo "changed_directories={\"dir\":${{ steps.changed-files.outputs.all_changed_files }}}" >> "$GITHUB_OUTPUT" | ||
|
||
build-and-publish: | ||
runs-on: ubuntu-latest | ||
if: ${{ needs.generate-matrix.outputs.changed_directories != '' }} | ||
strategy: | ||
matrix: ${{ fromJson(needs.generate-matrix.outputs.changed_directories) }} | ||
needs: | ||
- generate-matrix | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Get current branch | ||
run: echo "BRANCH=$(echo ${GITHUB_REF#refs/*/} | tr / -)" >> $GITHUB_ENV | ||
- name: Get image repo | ||
run: | | ||
source ${{ matrix.dir }}/config.env | ||
echo "REPO=$IMAGE_NAME" >> $GITHUB_ENV | ||
- name: Get image directory basename | ||
run: | | ||
NAME=$(basename ${{ matrix.dir }}) | ||
echo "NAME=$NAME" >> $GITHUB_ENV | ||
- name: Setup QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Build and publish custom image | ||
uses: docker/build-push-action@v6 | ||
with: | ||
push: true | ||
file: custom-images/${{ env.NAME }}/Dockerfile | ||
context: custom-images/${{ env.NAME }} | ||
tags: "${{ env.REPO }}:${{ env.BRANCH }}" | ||
platforms: linux/amd64, linux/arm64 |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.