1
0
mirror of https://github.com/gilbN/theme.park.git synced 2024-10-03 22:17:08 +02:00

- Drop push to docker hub

- Update action versions in minify workflow.
- Set permission in minify workflow.
This commit is contained in:
GilbN 2023-09-30 12:13:56 +02:00
parent f2c81fea4a
commit aa8ef22f3a
3 changed files with 9 additions and 70 deletions

View File

@ -94,50 +94,3 @@ jobs:
docker build docker-mods/$app --tag ghcr.io/${{ secrets.GHCR_USER }}/theme.park:$app${{ github.event.inputs.append-tag }}
docker push ghcr.io/${{ secrets.GHCR_USER }}/theme.park:$app${{ github.event.inputs.append-tag }}
done
push_to_dockerhub:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3.1.0
with:
fetch-depth: 0
- name: Login to Docker Hub
uses: docker/login-action@v2.1.0
with:
username: ${{ secrets.DH_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: build all on push
if: ${{ github.event_name == 'push' }}
run: |
branch=${{ steps.extract_branch.outputs.branch }}
if [ "$branch" = "master" ]; then
branch=""
else
branch="-$branch"
fi
for dir in docker-mods/*;
do
app="$( echo "$dir" | cut -d'/' -f2 -s )"
docker build docker-mods/$app --tag ${{ secrets.DH_USER }}/theme.park:$app$branch
docker push ${{ secrets.DH_USER }}/theme.park:$app$branch
done
- name: manually build
if: ${{ github.event.inputs.app && github.event.inputs.app != 'build-all-the-mods' }}
run: |
docker build docker-mods/${{ github.event.inputs.app }} --tag ${{ secrets.DH_USER }}/theme.park:${{ github.event.inputs.app }}${{ github.event.inputs.append-tag }}
docker push ${{ secrets.DH_USER }}/theme.park:${{ github.event.inputs.app }}${{ github.event.inputs.append-tag }}
- name: manually build all mods
if: ${{ github.event.inputs.app == 'build-all-the-mods' }}
run: |
for dir in docker-mods/*;
do
app="$( echo "$dir" | cut -d'/' -f2 -s )"
docker build docker-mods/$app --tag ${{ secrets.DH_USER }}/theme.park:$app${{ github.event.inputs.append-tag }}
docker push ${{ secrets.DH_USER }}/theme.park:$app${{ github.event.inputs.append-tag }}
done

View File

@ -64,22 +64,15 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GH_PAT }}
- name: Login to Docker Hub
uses: docker/login-action@v2.1.0
with:
username: ${{ secrets.DH_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: build&push
uses: docker/build-push-action@v3.2.0
with:
push: ${{ github.event_name != 'pull_request' }}
platforms: ${{ env.platform }}
file: ./${{ matrix.architecture }}.Dockerfile
cache-from: docker.io/${{ env.cache }}
cache-to: docker.io/${{ env.cache }}
cache-from: ghcr.io/${{ env.cache }}
cache-to: ghcr.io/${{ env.cache }}
tags: |
docker.io/${{ env.tag }}
ghcr.io/${{ env.tag }}
labels: |
org.opencontainers.image.created=${{ env.created }}
@ -98,20 +91,12 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
registry: [docker.io, ghcr.io]
registry: [ghcr.io]
needs: [build-and-push-it-to-the-limit]
steps:
- name: Checkout
uses: actions/checkout@v3.1.0
- name: Login to DockerHub
if: matrix.registry == 'docker.io'
uses: docker/login-action@v2.1.0
with:
registry: docker.io
username: ${{ secrets.DH_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
if: matrix.registry == 'ghcr.io'
uses: docker/login-action@v2.1.0

View File

@ -1,4 +1,5 @@
name: Minify CSS and deploy to live branch
permissions: write-all
on:
push:
branches:
@ -23,7 +24,7 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.1.0
- uses: actions/checkout@v4.1.0
with:
fetch-depth: 0
- name: Wrong domain check
@ -34,7 +35,7 @@ jobs:
exit 1
fi
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4.3.0
uses: actions/setup-python@v4.7.0
with:
python-version: '3.10'
- name: Run themes.py
@ -65,7 +66,7 @@ jobs:
fi
done
- name: Deploy
uses: peaceiris/actions-gh-pages@v3.8.0
uses: peaceiris/actions-gh-pages@v3.9.3
if: ${{ github.ref == 'refs/heads/master' || github.event.inputs.branch == 'master' }}
with:
publish_dir: ./
@ -73,7 +74,7 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
exclude_assets: ''
- name: Deploy Develop
uses: peaceiris/actions-gh-pages@v3.8.0
uses: peaceiris/actions-gh-pages@v3.9.3
if: ${{ github.ref == 'refs/heads/develop' || github.event.inputs.branch == 'develop' }}
with:
publish_dir: ./
@ -81,7 +82,7 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
exclude_assets: ''
- name: Deploy Testing
uses: peaceiris/actions-gh-pages@v3.8.0
uses: peaceiris/actions-gh-pages@v3.9.3
if: ${{ github.ref == 'refs/heads/testing' || github.event.inputs.branch == 'testing' }}
with:
publish_dir: ./