Skip to content

Commit

Permalink
docker with legacy buildx action
Browse files Browse the repository at this point in the history
  • Loading branch information
lbesson committed Jun 17, 2024
1 parent 327d35b commit 559b5e2
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,43 @@ jobs:
labels: ${{ steps.docker_meta.outputs.labels }}
build-args: |
VERSION=${{ github.sha }}
DockerLegacy:
# only publish if tests passed
needs: test
# secrets are not available for PR from forks, and dependabot PRs, we don't want to build them
if: ${{ github.event_name != 'pull_request' && github.actor != 'dependabot[bot]' }}
runs-on: ubuntu-latest
- name: Login to DockerHub
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
id: docker_meta
uses: docker/[email protected]
with:
images: ghcr.io/c2corg/v6_api
flavor: |
latest=auto
prefix=
suffix=-legacy,onlatest=true
tags: |
type=semver,pattern={{version}}
- name: Checkout repository
uses: actions/[email protected]
- run: git archive --format=tar --output project.tar "$GITHUB_SHA"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
version: v0.9.1 # use pre 10 version of buildx
- name: Publish the docker image
uses: docker/build-push-action@v5
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
build-args: |
VERSION=${{ github.sha }}

0 comments on commit 559b5e2

Please sign in to comment.