Skip to content

Commit 018a3dd

Browse files
committed
fix: publish ci container
1 parent 28f3bbd commit 018a3dd

File tree

2 files changed

+47
-2
lines changed

2 files changed

+47
-2
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Publish Container
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
semver:
7+
description: 'SEMVER to set on the release'
8+
required: true
9+
type: string
10+
11+
permissions:
12+
contents: write
13+
packages: write
14+
15+
jobs:
16+
build-ci-image:
17+
runs-on: ubuntu-latest
18+
env:
19+
SEMVER: ${{ inputs.semver }}
20+
steps:
21+
- name: Check out repository
22+
uses: actions/checkout@v3
23+
24+
- name: Log in to GitHub Container Registry
25+
uses: docker/login-action@v2
26+
with:
27+
registry: ghcr.io
28+
# GITHUB_TOKEN is automatically provided in GitHub Actions
29+
username: ${{ github.actor }}
30+
password: ${{ secrets.GITHUB_TOKEN }}
31+
32+
- name: Set up QEMU (for multi-arch builds, optional)
33+
uses: docker/setup-qemu-action@v3
34+
35+
- name: Set up Docker Buildx
36+
uses: docker/setup-buildx-action@v3
37+
38+
- name: Build and push Docker image
39+
uses: docker/build-push-action@v6
40+
with:
41+
context: .
42+
push: true
43+
tags: |
44+
ghcr.io/ensono/aws-cli-auth-ci:${{ inputs.semver }}
45+
platforms: linux/amd64,linux/arm64 # adjust as needed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ jobs:
7474
- name: Analyze with SonarCloud
7575
uses: SonarSource/sonarqube-scan-action@v5
7676
env:
77-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information
78-
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} # Generate a token on Sonarcloud.io, add it to the secrets of this repo with the name SONAR_TOKEN (Settings > Secrets > Actions > add new repository secret)
77+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
78+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
7979
with:
8080
projectBaseDir: .
8181
args: >

0 commit comments

Comments
 (0)