update workflow
This commit is contained in:
parent
2d2488945b
commit
1d7208595b
|
|
@ -8,12 +8,15 @@ name: Build
|
|||
|
||||
on:
|
||||
push:
|
||||
branches: # build all branches
|
||||
- '**'
|
||||
tags-ignore: # but don't build tags
|
||||
branches-ignore: # build all branches except:
|
||||
- 'dependabot/**' # prevent GHA triggered twice (once for commit to the branch and once for opening/syncing the PR)
|
||||
- 'dependencies/pdm' # prevent GHA triggered twice (once for commit to the branch and once for opening/syncing the PR)
|
||||
tags-ignore: # don't build tags
|
||||
- '**'
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
- '.editorconfig'
|
||||
- '.git*'
|
||||
- '.github/workflows/stale.yml'
|
||||
- '.github/*.yml'
|
||||
schedule:
|
||||
|
|
@ -70,13 +73,13 @@ jobs:
|
|||
run: env | sort
|
||||
|
||||
- name: Git Checkout
|
||||
uses: actions/checkout@v4 #https://github.com/actions/checkout
|
||||
uses: actions/checkout@v4 # https://github.com/actions/checkout
|
||||
|
||||
- name: Check Dockerfile
|
||||
uses: hadolint/hadolint-action@v3.1.0
|
||||
with:
|
||||
dockerfile: image/Dockerfile
|
||||
ignore: DL3008,SC1091 # https://github.com/hadolint/hadolint/wiki/DL3008
|
||||
ignore: DL3008,SC1091 # https://github.com/hadolint/hadolint/wiki/DL3008
|
||||
|
||||
- name: Cache trivy cache
|
||||
uses: actions/cache@v4
|
||||
|
|
@ -94,18 +97,18 @@ jobs:
|
|||
run: sudo apt-get install --no-install-recommends -y dos2unix
|
||||
|
||||
- name: Install regclient
|
||||
if: ${{ github.ref_name == 'main' && github.event_name != 'pull_request' && !env.ACT }} # https://github.com/nektos/act#skipping-steps
|
||||
if: ${{ github.ref_name == 'main' && github.event_name != 'pull_request' && !env.ACT }} # https://github.com/nektos/act#skipping-steps
|
||||
uses: iarekylew00t/regctl-installer@v1
|
||||
|
||||
- name: Login to docker.io
|
||||
if: ${{ github.ref_name == 'main' && github.event_name != 'pull_request' && !env.ACT }} # https://github.com/nektos/act#skipping-steps
|
||||
if: ${{ github.ref_name == 'main' && github.event_name != 'pull_request' && !env.ACT }} # https://github.com/nektos/act#skipping-steps
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_HUB_TOKEN }}
|
||||
|
||||
- name: Login to ghcr.io
|
||||
if: ${{ github.ref_name == 'main' && github.event_name != 'pull_request' && !env.ACT }} # https://github.com/nektos/act#skipping-steps
|
||||
if: ${{ github.ref_name == 'main' && github.event_name != 'pull_request' && !env.ACT }} # https://github.com/nektos/act#skipping-steps
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
|
|
@ -128,7 +131,7 @@ jobs:
|
|||
|
||||
- name: Delete untagged images
|
||||
uses: actions/github-script@v7
|
||||
if: ${{ github.ref_name == 'main' && github.event_name != 'pull_request' && !env.ACT }} # https://github.com/nektos/act#skipping-steps
|
||||
if: ${{ github.ref_name == 'main' && github.event_name != 'pull_request' && !env.ACT }} # https://github.com/nektos/act#skipping-steps
|
||||
continue-on-error: true
|
||||
with:
|
||||
github-token: ${{ secrets.GHA_DELETE_PACKAGES }}
|
||||
|
|
|
|||
|
|
@ -14,16 +14,16 @@ bin/
|
|||
**/.*.md.html
|
||||
|
||||
# IntelliJ
|
||||
.idea
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
/.idea
|
||||
/*.iml
|
||||
/*.ipr
|
||||
/*.iws
|
||||
|
||||
# NetBeans
|
||||
nb-configuration.xml
|
||||
|
||||
# Visual Studio Code
|
||||
.vscode
|
||||
/.vscode
|
||||
|
||||
# OSX
|
||||
.DS_Store
|
||||
|
|
|
|||
Loading…
Reference in New Issue