mirror of
https://github.com/shenxn/protonmail-bridge-docker.git
synced 2025-12-06 08:27:08 +00:00
checkout first
This commit is contained in:
parent
bf5a56d968
commit
fa91962c3e
18
.github/workflows/build.yaml
vendored
18
.github/workflows/build.yaml
vendored
@ -23,6 +23,9 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
steps:
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@master
|
||||||
|
|
||||||
- name: Prepare
|
- name: Prepare
|
||||||
run: |
|
run: |
|
||||||
platform=${{ matrix.platform }}
|
platform=${{ matrix.platform }}
|
||||||
@ -30,7 +33,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Set version
|
- name: Set version
|
||||||
id: version
|
id: version
|
||||||
run: echo "::set-output name=version::`cat VERSION`"
|
run: echo "version=`cat VERSION`" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Docker meta
|
- name: Docker meta
|
||||||
id: meta
|
id: meta
|
||||||
@ -55,7 +58,7 @@ jobs:
|
|||||||
file: ./build/Dockerfile
|
file: ./build/Dockerfile
|
||||||
tags: localbuild/protonmail-bridge:test
|
tags: localbuild/protonmail-bridge:test
|
||||||
build-args: |
|
build-args: |
|
||||||
version="${{ steps.version.outputs.version }}"
|
version="${{ env.version }}"
|
||||||
- name: Scan image
|
- name: Scan image
|
||||||
id: scan
|
id: scan
|
||||||
uses: anchore/scan-action@v6
|
uses: anchore/scan-action@v6
|
||||||
@ -80,6 +83,9 @@ jobs:
|
|||||||
- linux/arm/v7
|
- linux/arm/v7
|
||||||
- linux/riscv64
|
- linux/riscv64
|
||||||
steps:
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@master
|
||||||
|
|
||||||
- name: Prepare
|
- name: Prepare
|
||||||
run: |
|
run: |
|
||||||
platform=${{ matrix.platform }}
|
platform=${{ matrix.platform }}
|
||||||
@ -87,7 +93,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Set version
|
- name: Set version
|
||||||
id: version
|
id: version
|
||||||
run: echo "::set-output name=version::`cat VERSION`"
|
run: echo "version=`cat VERSION`" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Docker meta
|
- name: Docker meta
|
||||||
id: meta
|
id: meta
|
||||||
@ -125,11 +131,11 @@ jobs:
|
|||||||
outputs: type=image,"name=name=${{ env.DOCKERHUB_REPO }},${{ env.GHCR_REPO }}",push-by-digest=true,name-canonical=true,push=true
|
outputs: type=image,"name=name=${{ env.DOCKERHUB_REPO }},${{ env.GHCR_REPO }}",push-by-digest=true,name-canonical=true,push=true
|
||||||
context: ./build
|
context: ./build
|
||||||
file: ./build/Dockerfile
|
file: ./build/Dockerfile
|
||||||
tags: build,{{ steps.version.outputs.version }}-build
|
tags: build,{{ env.version }}-build
|
||||||
provenance: true
|
provenance: true
|
||||||
sbom: true
|
sbom: true
|
||||||
build-args: |
|
build-args: |
|
||||||
version="${{ steps.version.outputs.version }}"
|
version="${{ env.version }}"
|
||||||
|
|
||||||
- name: Export digest
|
- name: Export digest
|
||||||
run: |
|
run: |
|
||||||
@ -196,7 +202,7 @@ jobs:
|
|||||||
${{ env.DOCKERHUB_REPO }}
|
${{ env.DOCKERHUB_REPO }}
|
||||||
${{ env.GHCR_REPO }}
|
${{ env.GHCR_REPO }}
|
||||||
tags: |
|
tags: |
|
||||||
type=raw,enable=true,value=${{ steps.version.outputs.version }}-build
|
type=raw,enable=true,value=${{ env.version }}-build
|
||||||
type=raw,enable=true,suffix=,value=build
|
type=raw,enable=true,suffix=,value=build
|
||||||
|
|
||||||
- name: Create manifest list and push
|
- name: Create manifest list and push
|
||||||
|
|||||||
4
.github/workflows/deb.yaml
vendored
4
.github/workflows/deb.yaml
vendored
@ -24,7 +24,7 @@ jobs:
|
|||||||
uses: actions/checkout@master
|
uses: actions/checkout@master
|
||||||
- name: Set version
|
- name: Set version
|
||||||
id: version
|
id: version
|
||||||
run: echo "::set-output name=version::`cat VERSION`"
|
run: echo "version=`cat VERSION`" >> $GITHUB_ENV
|
||||||
- name: Set repo
|
- name: Set repo
|
||||||
id: repo
|
id: repo
|
||||||
run: if [[ $GITHUB_REF == "refs/heads/master" ]]; then echo "::set-output name=repo::${DOCKER_REPO}"; else echo "::set-output name=repo::${DOCKER_REPO_DEV}"; fi
|
run: if [[ $GITHUB_REF == "refs/heads/master" ]]; then echo "::set-output name=repo::${DOCKER_REPO}"; else echo "::set-output name=repo::${DOCKER_REPO_DEV}"; fi
|
||||||
@ -74,6 +74,6 @@ jobs:
|
|||||||
file: ./deb/Dockerfile
|
file: ./deb/Dockerfile
|
||||||
tags: |
|
tags: |
|
||||||
${{ steps.repo.outputs.repo }}:latest
|
${{ steps.repo.outputs.repo }}:latest
|
||||||
${{ steps.repo.outputs.repo }}:${{ steps.version.outputs.version }}
|
${{ steps.repo.outputs.repo }}:${{ env.version }}
|
||||||
labels: ${{ steps.docker_meta.outputs.labels }}
|
labels: ${{ steps.docker_meta.outputs.labels }}
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user