mirror of
https://github.com/elgohr/Publish-Docker-Github-Action.git
synced 2026-03-12 18:07:12 -04:00
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2 to 3. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/v2...v3) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
92 lines
2.7 KiB
YAML
92 lines
2.7 KiB
YAML
name: Release
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
tags-ignore:
|
|
- 'v*'
|
|
pull_request:
|
|
branches: [ main ]
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Build the Docker image
|
|
run: docker build .
|
|
|
|
integration-test-github:
|
|
runs-on: ubuntu-latest
|
|
if: github.event_name != 'pull_request'
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Publish to Registry
|
|
if: ${{ github.actor != 'dependabot[bot]' }}
|
|
uses: elgohr/Publish-Docker-Github-Action@main
|
|
with:
|
|
name: ghcr.io/elgohr/publish-docker-github-action/publish-docker-github-action
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
registry: ghcr.io
|
|
|
|
integration-test-dockerhub:
|
|
runs-on: ubuntu-latest
|
|
if: github.event_name != 'pull_request'
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Publish to Registry
|
|
if: ${{ github.actor != 'dependabot[bot]' }}
|
|
uses: elgohr/Publish-Docker-Github-Action@main
|
|
with:
|
|
name: lgohr/publish-docker-github-action
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
snapshot: true
|
|
tag_names: true
|
|
|
|
integration-test-multi-arch:
|
|
runs-on: ubuntu-latest
|
|
if: github.event_name != 'pull_request'
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Set up Docker Buildx for Multi-Arch Build
|
|
uses: docker/setup-buildx-action@v3
|
|
- name: Publish to Registry
|
|
if: ${{ github.actor != 'dependabot[bot]' }}
|
|
uses: elgohr/Publish-Docker-Github-Action@main
|
|
with:
|
|
name: ghcr.io/elgohr/publish-docker-github-action/multi-arch-publish-docker-github-action
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
registry: ghcr.io
|
|
platforms: linux/amd64,linux/arm64
|
|
dockerfile: testdata/Multi-Arch-Dockerfile
|
|
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
if: github.event_name != 'pull_request'
|
|
needs:
|
|
- test
|
|
- integration-test-github
|
|
- integration-test-dockerhub
|
|
- integration-test-multi-arch
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
token: ${{ secrets.PUBLISH_TOKEN }} # for pushing to protected branch
|
|
- name: Publish new version
|
|
run: |
|
|
git config --global user.email "no_reply@gohr.digital"
|
|
git config --global user.name "Release Bot"
|
|
git tag -fa v5 -m "Update v5 tag"
|
|
git push origin v5 --force
|