Browse Source

Bump versions and replace set-output commands

develop
GilbN 3 years ago
parent
commit
b62cc57fdb
  1. 16
      .github/workflows/auto-build.yml
  2. 10
      .github/workflows/minify-and-deploy.yml

16
.github/workflows/auto-build.yml

@ -48,15 +48,15 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: checkout - name: checkout
uses: actions/checkout@v2 uses: actions/checkout@v3.1.0
with: with:
fetch-depth: 0 fetch-depth: 0
- name: get changed files - name: get changed files
id: getfile id: getfile
run: | run: |
echo "::set-output name=files::$(git diff-tree --no-commit-id --name-only -r ${{ github.sha }} docker-mods/| xargs)" echo "files=$(git diff-tree --no-commit-id --name-only -r ${{ github.sha }} docker-mods/| xargs)" >> $GITHUB_ENV
- name: Login to GitHub Container Registry - name: Login to GitHub Container Registry
uses: docker/login-action@v1 uses: docker/login-action@v2.1.0
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.repository_owner }} username: ${{ github.repository_owner }}
@ -64,7 +64,7 @@ jobs:
- name: find correct directory then build&push - name: find correct directory then build&push
if: ${{ github.event_name == 'push' }} if: ${{ github.event_name == 'push' }}
run: | run: |
for i in ${{ steps.getfile.outputs.files }} for i in ${{ env.files }}
do do
directory="$( echo $i | cut -d'/' -f2 -s )" directory="$( echo $i | cut -d'/' -f2 -s )"
if [ -z "$directory" ]; then if [ -z "$directory" ]; then
@ -95,22 +95,22 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: checkout - name: checkout
uses: actions/checkout@v2 uses: actions/checkout@v3.1.0
with: with:
fetch-depth: 0 fetch-depth: 0
- name: get changed files - name: get changed files
id: getfile id: getfile
run: | run: |
echo "::set-output name=files::$(git diff-tree --no-commit-id --name-only -r ${{ github.sha }} docker-mods/| xargs)" echo "files=$(git diff-tree --no-commit-id --name-only -r ${{ github.sha }} docker-mods/| xargs)" >> $GITHUB_ENV
- name: Login to Docker Hub - name: Login to Docker Hub
uses: docker/login-action@v1 uses: docker/login-action@v2.1.0
with: with:
username: ${{ secrets.DH_USER }} username: ${{ secrets.DH_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: find correct directory then build&push - name: find correct directory then build&push
if: ${{ github.event_name == 'push' }} if: ${{ github.event_name == 'push' }}
run: | run: |
for i in ${{ steps.getfile.outputs.files }} for i in ${{ env.files }}
do do
directory="$( echo $i | cut -d'/' -f2 -s )" directory="$( echo $i | cut -d'/' -f2 -s )"
if [ -z "$directory" ]; then if [ -z "$directory" ]; then

10
.github/workflows/minify-and-deploy.yml

@ -23,7 +23,7 @@ jobs:
deploy: deploy:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3.1.0
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Wrong domain check - name: Wrong domain check
@ -34,7 +34,7 @@ jobs:
exit 1 exit 1
fi fi
- name: Set up Python ${{ matrix.python-version }} - name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2 uses: actions/setup-python@v4.3.0
- name: Run themes.py - name: Run themes.py
run: | run: |
python themes.py python themes.py
@ -63,7 +63,7 @@ jobs:
fi fi
done done
- name: Deploy - name: Deploy
uses: peaceiris/actions-gh-pages@v3 uses: peaceiris/actions-gh-pages@v3.8.0
if: ${{ github.ref == 'refs/heads/master' || github.event.inputs.branch == 'master' }} if: ${{ github.ref == 'refs/heads/master' || github.event.inputs.branch == 'master' }}
with: with:
publish_dir: ./ publish_dir: ./
@ -71,7 +71,7 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}
exclude_assets: '' exclude_assets: ''
- name: Deploy Develop - name: Deploy Develop
uses: peaceiris/actions-gh-pages@v3 uses: peaceiris/actions-gh-pages@v3.8.0
if: ${{ github.ref == 'refs/heads/develop' || github.event.inputs.branch == 'develop' }} if: ${{ github.ref == 'refs/heads/develop' || github.event.inputs.branch == 'develop' }}
with: with:
publish_dir: ./ publish_dir: ./
@ -79,7 +79,7 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}
exclude_assets: '' exclude_assets: ''
- name: Deploy Testing - name: Deploy Testing
uses: peaceiris/actions-gh-pages@v3 uses: peaceiris/actions-gh-pages@v3.8.0
if: ${{ github.ref == 'refs/heads/testing' || github.event.inputs.branch == 'testing' }} if: ${{ github.ref == 'refs/heads/testing' || github.event.inputs.branch == 'testing' }}
with: with:
publish_dir: ./ publish_dir: ./

Loading…
Cancel
Save