Align workflows with htpasswd standard pattern #8
+31
-15
@@ -1,34 +1,50 @@
|
|||||||
name: Nightly Rebuild
|
name: Nightly Rebuild
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 0 * * *'
|
- cron: '0 0 * * *'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
rebuild:
|
hadolint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
||||||
- name: Set up Docker Buildx
|
- uses: hadolint/hadolint-action@2332a7b74a6de0dda2e2221d575162eba76ba5e5 # v3.3.0
|
||||||
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5
|
continue-on-error: true
|
||||||
- name: Login to Docker Hub
|
with:
|
||||||
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee
|
dockerfile: pkg/Dockerfile
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
||||||
|
- uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4
|
||||||
|
- run: docker build -f pkg/Dockerfile -t ci-image:${{ github.sha }} .
|
||||||
|
- run: bash tests/test.sh ci-image:${{ github.sha }}
|
||||||
|
build-push:
|
||||||
|
needs: [test]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4
|
||||||
|
- uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
- name: Docker metadata
|
- id: get-latest-tag
|
||||||
id: meta
|
run: |
|
||||||
uses: docker/metadata-action@80c7e94dd9b9319bd5eb7a0e0fe9291e23a2a2e9
|
TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
|
||||||
|
echo "tag=$TAG" >> $GITHUB_OUTPUT
|
||||||
|
- id: meta
|
||||||
|
uses: docker/metadata-action@80c7e94dd9b9319bd5eb7a0e0fe9291e23a2a2e9 # v6
|
||||||
with:
|
with:
|
||||||
images: jcabillot/send
|
images: jcabillot/send
|
||||||
tags: |
|
tags: |
|
||||||
type=raw,value=nightly
|
type=raw,value=${{ steps.get-latest-tag.outputs.tag }}-latest,enable=${{ steps.get-latest-tag.outputs.tag != '' }}
|
||||||
type=sha
|
- uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7.2.0
|
||||||
- name: Build and push
|
|
||||||
uses: docker/build-push-action@f9f3042e7f2789586610d6e8b85c8f03e5195baf
|
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: pkg/Dockerfile
|
file: pkg/Dockerfile
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
pull: true
|
||||||
|
|||||||
+36
-26
@@ -1,34 +1,44 @@
|
|||||||
name: Main
|
name: Main Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [master]
|
branches: [master]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-push:
|
hadolint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
||||||
- name: Set up Docker Buildx
|
- uses: hadolint/hadolint-action@2332a7b74a6de0dda2e2221d575162eba76ba5e5 # v3.3.0
|
||||||
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5
|
continue-on-error: true
|
||||||
- name: Login to Docker Hub
|
|
||||||
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee
|
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
dockerfile: pkg/Dockerfile
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
test:
|
||||||
- name: Docker metadata
|
runs-on: ubuntu-latest
|
||||||
id: meta
|
steps:
|
||||||
uses: docker/metadata-action@80c7e94dd9b9319bd5eb7a0e0fe9291e23a2a2e9
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
||||||
|
- uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4
|
||||||
|
- run: docker build -f pkg/Dockerfile -t ci-image:${{ github.sha }} .
|
||||||
|
- run: bash tests/test.sh ci-image:${{ github.sha }}
|
||||||
|
build:
|
||||||
|
needs: [test]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
||||||
|
- uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4
|
||||||
|
- run: docker build -f pkg/Dockerfile -t jcabillot/send:${{ github.sha }} .
|
||||||
|
tag:
|
||||||
|
needs: [build]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
||||||
with:
|
with:
|
||||||
images: jcabillot/send
|
fetch-depth: 0
|
||||||
tags: |
|
- name: Configure git auth
|
||||||
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/master' }}
|
run: |
|
||||||
type=sha
|
git remote set-url origin "https://x-access-token:${{ secrets.SA_TOKEN_ACTION_PUSH_TAGS }}@scm.cabillot.eu/web/send.git"
|
||||||
- name: Build and push
|
- uses: anothrNick/github-tag-action@4ed44965e0db8dab2b466a16da04aec3cc312fd8 # v1.75.0
|
||||||
uses: docker/build-push-action@f9f3042e7f2789586610d6e8b85c8f03e5195baf
|
env:
|
||||||
with:
|
GITHUB_TOKEN: ${{ secrets.SA_TOKEN_ACTION_PUSH_TAGS }}
|
||||||
context: .
|
DEFAULT_BUMP: patch
|
||||||
file: pkg/Dockerfile
|
RELEASE_BRANCHES: master
|
||||||
push: true
|
WITH_V: true
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
GIT_API_TAGGING: false
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
|
||||||
|
|||||||
@@ -1,24 +1,20 @@
|
|||||||
name: PR Checks
|
name: PR Checks
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [master]
|
branches: [master]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
hadolint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
||||||
- name: Hadolint
|
- uses: hadolint/hadolint-action@2332a7b74a6de0dda2e2221d575162eba76ba5e5 # v3.3.0
|
||||||
uses: hadolint/hadolint-action@2332a7b74a6de0dda2e2221d575162eba76ba5e5
|
continue-on-error: true
|
||||||
with:
|
with:
|
||||||
dockerfile: pkg/Dockerfile
|
dockerfile: pkg/Dockerfile
|
||||||
|
build-test:
|
||||||
test:
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
||||||
- name: Build image
|
- uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4
|
||||||
run: docker build -f pkg/Dockerfile -t ci-image:${{ github.sha }} .
|
- run: docker build -f pkg/Dockerfile -t ci-image:${{ github.sha }} .
|
||||||
- name: Run tests
|
- run: bash tests/test.sh ci-image:${{ github.sha }}
|
||||||
run: bash tests/test.sh ci-image:${{ github.sha }}
|
|
||||||
|
|||||||
+39
-13
@@ -1,19 +1,45 @@
|
|||||||
name: Tag Release
|
name: Tag Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [master]
|
tags: ['*']
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
tag:
|
hadolint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
||||||
- name: Bump version and push tag
|
- uses: hadolint/hadolint-action@2332a7b74a6de0dda2e2221d575162eba76ba5e5 # v3.3.0
|
||||||
uses: anothrNick/github-tag-action@4ed44965e0db8dab2b466a16da04aec3cc312fd8
|
continue-on-error: true
|
||||||
env:
|
with:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
dockerfile: pkg/Dockerfile
|
||||||
DEFAULT_BUMP: patch
|
test:
|
||||||
RELEASE_BRANCHES: master
|
runs-on: ubuntu-latest
|
||||||
WITH_V: true
|
steps:
|
||||||
GIT_API_TAGGING: false
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
||||||
|
- uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4
|
||||||
|
- run: docker build -f pkg/Dockerfile -t ci-image:${{ github.sha }} .
|
||||||
|
- run: bash tests/test.sh ci-image:${{ github.sha }}
|
||||||
|
build-push:
|
||||||
|
needs: [test]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
||||||
|
- uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4
|
||||||
|
- uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
- id: meta
|
||||||
|
uses: docker/metadata-action@80c7e94dd9b9319bd5eb7a0e0fe9291e23a2a2e9 # v6
|
||||||
|
with:
|
||||||
|
images: jcabillot/send
|
||||||
|
tags: |
|
||||||
|
type=ref,event=tag
|
||||||
|
type=ref,event=tag,suffix=-latest
|
||||||
|
- uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7.2.0
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: pkg/Dockerfile
|
||||||
|
push: true
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
pull: true
|
||||||
|
|||||||
Reference in New Issue
Block a user