Skip to content

Commit

Permalink
Match ex vers
Browse files Browse the repository at this point in the history
  • Loading branch information
robjmorrissey committed Jun 5, 2023
2 parents 6823363 + 2a34bde commit 2eaf427
Show file tree
Hide file tree
Showing 244 changed files with 13,958 additions and 610 deletions.
3 changes: 2 additions & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[alias]
generate_plan_tests = "test --package nixpacks --lib --test generate_plan_tests"
generate-plan-tests = "test --package nixpacks --lib --test generate_plan_tests"
snapshot = "insta test --review -- --test generate_plan_tests"
lint-fix = "clippy --fix --allow-dirty --allow-staged --all-targets --all-features -- -D warnings"
47 changes: 37 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
on:
push:
branches:
- main
paths-ignore:
- "docs/**"
pull_request:
paths-ignore:
- "docs/**"
# on:
# push:
# branches:
# - main
# paths-ignore:
# - "docs/**"
# pull_request:
# paths-ignore:
# - "docs/**"

name: CI

Expand Down Expand Up @@ -136,7 +136,15 @@ jobs:
toolchain: stable
override: true

- uses: Swatinem/rust-cache@v2
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Run cargo test
uses: actions-rs/cargo@v1
Expand Down Expand Up @@ -174,3 +182,22 @@ jobs:
with:
command: test
args: --package nixpacks --lib --test generate_plan_tests

flake:
name: Nix Flake
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '(cargo-release)')"
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- name: Checkout sources
uses: actions/checkout@v3

- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main

- name: Run nix flake check
run: nix flake check
18 changes: 9 additions & 9 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
on:
push:
branches:
- main
paths:
- 'docs/**'
pull_request:
paths:
- 'docs/**'
# on:
# push:
# branches:
# - main
# paths:
# - 'docs/**'
# pull_request:
# paths:
# - 'docs/**'

name: Docs

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/label-check.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Release Label Check

on:
pull_request_target:
types: [opened, labeled, unlabeled, synchronize]
# on:
# pull_request_target:
# types: [opened, labeled, unlabeled, synchronize]

jobs:
label-check:
Expand All @@ -12,5 +12,5 @@ jobs:
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
valid-labels: "release/patch, release/minor, release/major, release/skip"
pull-request-number: '${{ github.event.pull_request.number }}'
pull-request-number: "${{ github.event.pull_request.number }}"
disable-reviews: true
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
on:
push:
branches:
- main
paths:
- 'base/debian/*'
pull_request:
branches:
- main
paths:
- 'base/debian/*'
schedule:
- cron: '0 0 * * 2'
workflow_dispatch:
# on:
# push:
# branches:
# - main
# paths:
# - 'base/publish/*'
# pull_request:
# branches:
# - main
# paths:
# - 'base/publish/*'
# schedule:
# - cron: '0 0 * * 2'
# workflow_dispatch:

name: Publish Debian Base Images
name: Publish Debian & Ubuntu Base Images

jobs:
debian:
Expand All @@ -27,10 +27,10 @@ jobs:
steps:
- name: Checkout sources
uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
Expand All @@ -41,46 +41,63 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Get current date
id: date
run: echo "::set-output name=date::$(date +%s)"
- name: Build and push
uses: docker/build-push-action@v3

- name: Build and push [Debian]
uses: docker/build-push-action@v4
with:
context: base/debian
platforms: linux/arm64, linux/amd64, linux/386
push: ${{ github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
tags: ghcr.io/railwayapp/nixpacks:debian, ghcr.io/railwayapp/nixpacks:latest, ghcr.io/railwayapp/nixpacks:debian-${{ steps.date.outputs.date }}


- name: Build and push [Ubuntu]
uses: docker/build-push-action@v4
with:
context: base/ubuntu
platforms: linux/arm64, linux/amd64
push: ${{ github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
tags: ghcr.io/railwayapp/nixpacks:ubuntu, ghcr.io/railwayapp/nixpacks:ubuntu-${{ steps.date.outputs.date }}

- name: Bump base image
if: ${{ github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
run: |
sed -i 's/nixpacks:debian-.*/nixpacks:debian-${{ steps.date.outputs.date }}";/g' src/nixpacks/images.rs
sed -i 's/nixpacks:ubuntu-.*/nixpacks:ubuntu-${{ steps.date.outputs.date }}";/g' src/nixpacks/images.rs
- name: Create Pull Request
if: ${{ github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
uses: peter-evans/create-pull-request@v4
uses: peter-evans/create-pull-request@v5
with:
base: main
token: ${{ secrets.COMMITTER_TOKEN }}
commit-message: Bump base image
branch: debian-${{ steps.date.outputs.date }}
branch: publish-${{ steps.date.outputs.date }}
delete-branch: true
title: Bump Debian base image to `debian-${{ steps.date.outputs.date }}`
title: Bump base images to `${{ steps.date.outputs.date }}`
labels: release/patch

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push to Docker Hub
uses: docker/build-push-action@v3

- name: Build and push to Docker Hub [Debian]
uses: docker/build-push-action@v4
with:
context: base/debian
platforms: linux/arm64, linux/amd64, linux/386
push: ${{ github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
tags: railwayapp/nixpacks:debian, railwayapp/nixpacks:latest, railwayapp/nixpacks:debian-${{ steps.date.outputs.date }}

- name: Build and push to Docker Hub [Ubuntu]
uses: docker/build-push-action@v4
with:
context: base/ubuntu
platforms: linux/arm64, linux/amd64
push: ${{ github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
tags: railwayapp/nixpacks:ubuntu, railwayapp/nixpacks:ubuntu-${{ steps.date.outputs.date }}
86 changes: 0 additions & 86 deletions .github/workflows/publish_ubuntu.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

- name: Build Changelog
id: build_changelog
uses: mikepenz/release-changelog-builder-action@v3.6.0
uses: mikepenz/release-changelog-builder-action@v3.7.1
with:
configuration: ".github/changelog-configuration.json"
env:
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: 'Close stale issues and PRs'
name: "Close stale issues and PRs"

on:
schedule:
- cron: '30 1 * * *'
workflow_dispatch:
# on:
# schedule:
# - cron: '30 1 * * *'
# workflow_dispatch:

jobs:
stale:
Expand All @@ -12,15 +12,15 @@ jobs:
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v7
- uses: actions/stale@v8
with:
days-before-pr-stale: 10
days-before-pr-close: 5
days-before-issue-stale: -1 # Issues never go stale or close
days-before-issue-close: -1
stale-pr-label: 'stale'
stale-pr-message: 'This pull request is stale because it has been open 10 days with no activity. Remove stale label or comment or this will be closed in 5 days'
close-pr-message: 'This pull request was closed for lack of activity. Feel free to reopen later.'
exempt-pr-labels: 'awaiting-approval,work-in-progress'
stale-pr-label: "stale"
stale-pr-message: "This pull request is stale because it has been open 10 days with no activity. Remove stale label or comment or this will be closed in 5 days"
close-pr-message: "This pull request was closed for lack of activity. Feel free to reopen later."
exempt-pr-labels: "awaiting-approval,work-in-progress"
env:
ACTIONS_STEP_DEBUG: true
10 changes: 5 additions & 5 deletions .github/workflows/update-nixpkgs-archive.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Update Nixpkgs Archive

on:
schedule:
# Every Monday at 5 PM (UTC)
- cron: '0 17 * * 1'
# on:
# schedule:
# # Every Monday at 5 PM (UTC)
# - cron: '0 17 * * 1'

env:
BRANCH_NAME: auto-update/nixpkgs-archive
Expand Down Expand Up @@ -40,7 +40,7 @@ jobs:
echo "::set-output name=url::$URL"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.COMMITTER_TOKEN }}
title: Update nixpkgs archive
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,4 @@ result

.vscode/

.vstags
Loading

0 comments on commit 2eaf427

Please sign in to comment.