Skip to content

Commit 2d46fc1

Browse files
Eneman DonatienEneman Donatien
authored andcommitted
[BUG] ci image is not published
1 parent 75ce42c commit 2d46fc1

File tree

2 files changed

+31
-16
lines changed

2 files changed

+31
-16
lines changed

.github/workflows/publish.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ jobs:
3131
uses: docker/metadata-action@v5
3232
with:
3333
images: inseefrlab/s3-operator # list of Docker images to use as base name for tags
34+
tags: |
35+
type=ref,event=branch
36+
type=ref,event=pr
37+
type=semver,pattern={{version}}
38+
type=semver,pattern={{major}}.{{minor}}
39+
3440
3541
- name: Set up QEMU
3642
uses: docker/setup-qemu-action@v3
@@ -52,7 +58,7 @@ jobs:
5258
context: .
5359
file: ./Dockerfile
5460
push: ${{ github.event_name != 'pull_request' }}
55-
tags: ${{ github.event.inputs.image_tag }}
61+
tags: ${{ steps.docker_meta.outputs.tags }}
5662
labels: ${{ steps.docker_meta.outputs.labels }}
5763
platforms: linux/amd64,linux/arm64
5864

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ name: Make release
2020

2121
jobs:
2222

23-
create-release-branch:
23+
create-branch:
2424
runs-on: ubuntu-latest
2525
permissions:
2626
contents: write # Allows pushing branches
@@ -44,22 +44,31 @@ jobs:
4444
git checkout -b $NEW_BRANCH
4545
git push origin $NEW_BRANCH
4646
47-
48-
49-
50-
build-and-publish-docker:
51-
needs:
52-
- create-release-branch
53-
uses: ./.github/workflows/publish.yaml
47+
tags:
48+
runs-on: ubuntu-latest
49+
needs: create-branch
5450
permissions:
5551
id-token: write
56-
contents: read
57-
with:
58-
ref: ${{ github.ref }}
59-
image_tag: ${{ github.event.inputs.version }}
60-
secrets:
61-
registry_username: ${{ secrets.DOCKERHUB_USERNAME }}
62-
registry_password: ${{ secrets.DOCKERHUB_TOKEN }}
52+
contents: write
53+
repository-projects: write
54+
steps:
55+
- name: Checkout
56+
uses: actions/checkout@v4
57+
with:
58+
fetch-depth: 0
59+
ref: ${{ github.event.inputs.source_ref }}
60+
61+
- name: Configure Git
62+
run: |
63+
git config user.name "$GITHUB_ACTOR"
64+
git config user.email "[email protected]"
65+
66+
- name: Tag branch
67+
env:
68+
VERSION: ${{ github.event.inputs.version }}
69+
run: |
70+
git tag -f -a ${VERSION} -m "Release ${VERSION}."
71+
git push -f origin ${VERSION}
6372
6473
release:
6574
name: Make release

0 commit comments

Comments
 (0)