Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 35 additions & 33 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,18 @@

name: Docker

on:
release:
types: [published]
on: pull_request

push:
branches:
- "master"
pull_request:
branches:
- "master"
# on:
# release:
# types: [published]

# push:
# branches:
# - "master"
# pull_request:
# branches:
# - "master"

permissions:
contents: read
Expand All @@ -33,7 +35,7 @@ jobs:
contents: read # for dorny/paths-filter to fetch a list of changed files
pull-requests: read # for dorny/paths-filter to read pull requests
name: Filter
runs-on: ubuntu-latest
runs-on: tenki-standard-autoscale

outputs:
docker: ${{ steps.filter.outputs.docker }}
Expand All @@ -57,13 +59,13 @@ jobs:
build:
name: Docker Build Test
needs: paths-filter
if: needs.paths-filter.outputs.docker == 'true' || github.event_name == 'release' || github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'full-run')
# if: needs.paths-filter.outputs.docker == 'true' || github.event_name == 'release' || github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'full-run')
permissions:
contents: read
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
python_version: "3.11"
runs-on: ubuntu-latest # in the future we can try to use alternative runners here
runs-on: tenki-standard-autoscale # in the future we can try to use alternative runners here

steps:
- name: Check out repo
Expand Down Expand Up @@ -119,13 +121,13 @@ jobs:
migration_test:
name: Migration Test
needs: paths-filter
if: needs.paths-filter.outputs.docker == 'true' || github.event_name == 'release' || github.event_name == 'push'
# if: needs.paths-filter.outputs.docker == 'true' || github.event_name == 'release' || github.event_name == 'push'
permissions:
contents: read
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
python_version: "3.11"
runs-on: ubuntu-latest # in the future we can try to use alternative runners here
runs-on: tenki-standard-autoscale # in the future we can try to use alternative runners here

steps:
- name: Check out repo
Expand All @@ -149,7 +151,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
python_version: "3.11"
runs-on: ubuntu-latest # in the future we can try to use alternative runners here
runs-on: tenki-standard-autoscale # in the future we can try to use alternative runners here

steps:
- name: Check out repo
Expand All @@ -167,13 +169,13 @@ jobs:
echo "git_commit_hash=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
echo "git_commit_date=$(git show -s --format=%ci)" >> $GITHUB_ENV
- name: Set up QEMU
if: github.event_name != 'pull_request'
# if: github.event_name != 'pull_request'
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # [email protected]
- name: Set up Docker Buildx
if: github.event_name != 'pull_request'
# if: github.event_name != 'pull_request'
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # [email protected]
- name: Set up cosign
if: github.event_name != 'pull_request'
# if: github.event_name != 'pull_request'
uses: sigstore/cosign-installer@d7543c93d881b35a8faa02e8e3605f69b7a1ce62 # [email protected]
- name: Check if Dockerhub login is required
id: docker_login
Expand All @@ -183,23 +185,23 @@ jobs:
else
echo "skip_dockerhub_login=false" >> $GITHUB_OUTPUT
fi
- name: Login to Dockerhub
if: github.event_name != 'pull_request' && steps.docker_login.outputs.skip_dockerhub_login != 'true'
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # [email protected]
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
# - name: Login to Dockerhub
# if: github.event_name != 'pull_request' && steps.docker_login.outputs.skip_dockerhub_login != 'true'
# uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # [email protected]
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}

- name: Log into registry ghcr.io
if: github.event_name != 'pull_request'
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # [email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# - name: Log into registry ghcr.io
# if: github.event_name != 'pull_request'
# uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # [email protected]
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract Docker metadata
if: github.event_name != 'pull_request'
# if: github.event_name != 'pull_request'
id: meta
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # [email protected]
with:
Expand All @@ -209,7 +211,7 @@ jobs:
- uses: depot/setup-action@b0b1ea4f69e92ebf5dea3f8713a1b0c37b2126a5 # pin@v1
- name: Push Docker Images
id: push-docker
if: github.event_name != 'pull_request'
# if: github.event_name != 'pull_request'
uses: depot/build-push-action@9785b135c3c76c33db102e45be96a25ab55cd507 # pin@v1
with:
project: jczzbjkk68
Expand Down
Loading