mirror of
https://github.com/pomerium/pomerium.git
synced 2025-07-25 12:39:50 +02:00
Update docker master/latest tag handling (#598)
* Ensure latest is actually latest semver and not last published * Resume publishing master snapshot * Build master image off debug gcr.io/distroless/base:debug
This commit is contained in:
parent
6337377ad6
commit
7ad528fef5
4 changed files with 45 additions and 5 deletions
4
.github/goreleaser.yaml
vendored
4
.github/goreleaser.yaml
vendored
|
@ -93,7 +93,6 @@ snapshot:
|
||||||
dockers:
|
dockers:
|
||||||
- image_templates:
|
- image_templates:
|
||||||
- "pomerium/pomerium:{{ .Tag }}"
|
- "pomerium/pomerium:{{ .Tag }}"
|
||||||
- "pomerium/pomerium:latest"
|
|
||||||
dockerfile: .github/Dockerfile-release
|
dockerfile: .github/Dockerfile-release
|
||||||
binaries:
|
binaries:
|
||||||
- pomerium
|
- pomerium
|
||||||
|
@ -111,7 +110,6 @@ dockers:
|
||||||
- goarch: arm64
|
- goarch: arm64
|
||||||
image_templates:
|
image_templates:
|
||||||
- "pomerium/pomerium:arm64v8-{{ .Tag }}"
|
- "pomerium/pomerium:arm64v8-{{ .Tag }}"
|
||||||
- "pomerium/pomerium:arm64v8-latest"
|
|
||||||
dockerfile: .github/Dockerfile-release.arm64v8
|
dockerfile: .github/Dockerfile-release.arm64v8
|
||||||
binaries:
|
binaries:
|
||||||
- pomerium
|
- pomerium
|
||||||
|
@ -130,7 +128,6 @@ dockers:
|
||||||
goarm: 7
|
goarm: 7
|
||||||
image_templates:
|
image_templates:
|
||||||
- "pomerium/pomerium:arm32v7-{{ .Tag }}"
|
- "pomerium/pomerium:arm32v7-{{ .Tag }}"
|
||||||
- "pomerium/pomerium:arm32v7-latest"
|
|
||||||
dockerfile: .github/Dockerfile-release.arm32v7
|
dockerfile: .github/Dockerfile-release.arm32v7
|
||||||
binaries:
|
binaries:
|
||||||
- pomerium
|
- pomerium
|
||||||
|
@ -150,7 +147,6 @@ dockers:
|
||||||
goarm: 6
|
goarm: 6
|
||||||
image_templates:
|
image_templates:
|
||||||
- "pomerium/pomerium:arm32v6-{{ .Tag }}"
|
- "pomerium/pomerium:arm32v6-{{ .Tag }}"
|
||||||
- "pomerium/pomerium:arm32v6-latest"
|
|
||||||
dockerfile: .github/Dockerfile-release.arm32v6
|
dockerfile: .github/Dockerfile-release.arm32v6
|
||||||
binaries:
|
binaries:
|
||||||
- pomerium
|
- pomerium
|
||||||
|
|
19
.github/workflows/docker-master.yaml
vendored
Normal file
19
.github/workflows/docker-master.yaml
vendored
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
name: Docker Tag - Master
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Docker Publish - Master
|
||||||
|
uses: zenato/docker-action@master
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USER }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
repository: pomerium/pomerium
|
||||||
|
tag: master
|
25
.github/workflows/release.yaml
vendored
25
.github/workflows/release.yaml
vendored
|
@ -30,3 +30,28 @@ jobs:
|
||||||
args: release --config .github/goreleaser.yaml
|
args: release --config .github/goreleaser.yaml
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Get tag name
|
||||||
|
id: tagName
|
||||||
|
uses: olegtarasov/get-tag@v1
|
||||||
|
|
||||||
|
- name: Find latest tag
|
||||||
|
id: latestTag
|
||||||
|
run: |
|
||||||
|
LATEST_TAG=$(git tag | sort --version-sort | tail -1)
|
||||||
|
echo "::set-env name=LATEST_TAG::$LATEST_TAG"
|
||||||
|
|
||||||
|
- name: Publish latest tag
|
||||||
|
if: "env.LATEST_TAG == steps.tagName.outputs.tag"
|
||||||
|
run: |
|
||||||
|
docker tag pomerium/pomerium:${{ env.LATEST_TAG }} pomerium/pomerium:latest
|
||||||
|
docker push pomerium/pomerium:latest
|
||||||
|
|
||||||
|
docker tag pomerium/pomerium:arm32v7-${{ env.LATEST_TAG }} pomerium/pomerium:arm32v7-latest
|
||||||
|
docker push pomerium/pomerium:arm32v7-latest
|
||||||
|
|
||||||
|
docker tag pomerium/pomerium:arm32v6-${{ env.LATEST_TAG }} pomerium/pomerium:arm32v6-latest
|
||||||
|
docker push pomerium/pomerium:arm32v6-latest
|
||||||
|
|
||||||
|
docker tag pomerium/pomerium:arm64v8-${{ env.LATEST_TAG }} pomerium/pomerium:arm64v8-latest
|
||||||
|
docker push pomerium/pomerium:arm64v8-latest
|
||||||
|
|
|
@ -10,7 +10,7 @@ COPY . .
|
||||||
RUN make
|
RUN make
|
||||||
RUN touch /config.yaml
|
RUN touch /config.yaml
|
||||||
|
|
||||||
FROM gcr.io/distroless/static
|
FROM gcr.io/distroless/base:debug
|
||||||
WORKDIR /pomerium
|
WORKDIR /pomerium
|
||||||
COPY --from=build /go/src/github.com/pomerium/pomerium/bin/* /bin/
|
COPY --from=build /go/src/github.com/pomerium/pomerium/bin/* /bin/
|
||||||
COPY --from=build /config.yaml /pomerium/config.yaml
|
COPY --from=build /config.yaml /pomerium/config.yaml
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue