Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub action to build and push Docker image to GitHub registry #424

Open
wants to merge 77 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
78a3438
test build and push
abnerrizzi Aug 10, 2023
6b24418
test build and push
abnerrizzi Aug 10, 2023
641ee99
test build and push
abnerrizzi Aug 10, 2023
f656915
test build and push
abnerrizzi Aug 10, 2023
2e90967
test build and push
abnerrizzi Aug 10, 2023
445e629
test build and push
abnerrizzi Aug 10, 2023
0ebabf0
test build and push
abnerrizzi Aug 10, 2023
6594a76
test build and push
abnerrizzi Aug 10, 2023
7e9991e
test build and push
abnerrizzi Aug 10, 2023
db0f484
test build and push
abnerrizzi Aug 10, 2023
bc91d6e
test build and push
abnerrizzi Aug 10, 2023
9806956
test build and push
abnerrizzi Aug 10, 2023
e4a6c2f
test build and push
abnerrizzi Aug 10, 2023
dd1e880
test build and push
abnerrizzi Aug 10, 2023
3d1f82c
test build and push
abnerrizzi Aug 10, 2023
10faceb
test build and push
abnerrizzi Aug 10, 2023
11acd0e
test build and push
abnerrizzi Aug 10, 2023
dcddeaa
test build and push
abnerrizzi Aug 10, 2023
bd9b021
test build and push
abnerrizzi Aug 10, 2023
cd3bcca
test build and push
abnerrizzi Aug 10, 2023
5b75e09
test build and push
abnerrizzi Aug 10, 2023
4a3b3dc
test build and push
abnerrizzi Aug 10, 2023
00f0236
test build and push
abnerrizzi Aug 10, 2023
a34c29a
test build and push
abnerrizzi Aug 10, 2023
88c5b42
test build and push
abnerrizzi Aug 10, 2023
c2a3449
test build and push
abnerrizzi Aug 10, 2023
5d97699
test build and push
abnerrizzi Aug 10, 2023
7af1b65
test build and push
abnerrizzi Aug 10, 2023
225588e
test build and push
abnerrizzi Aug 10, 2023
dfe1598
test build and push
abnerrizzi Aug 10, 2023
d916111
test build and push
abnerrizzi Aug 10, 2023
c76e65b
test build and push
abnerrizzi Aug 10, 2023
7ef0ad2
test build and push
abnerrizzi Aug 10, 2023
cb79d17
test build and push
abnerrizzi Aug 10, 2023
ade0a84
test build and push
abnerrizzi Aug 10, 2023
3958486
test build and push
abnerrizzi Aug 10, 2023
17ea813
test build and push
abnerrizzi Aug 10, 2023
42c9744
test build and push
abnerrizzi Aug 10, 2023
481befa
test build and push
abnerrizzi Aug 10, 2023
3fa0dfb
test build and push
abnerrizzi Aug 10, 2023
37f5589
test build and push
abnerrizzi Aug 10, 2023
f47afea
test build and push
abnerrizzi Aug 10, 2023
a91580b
test build and push
abnerrizzi Aug 10, 2023
16d201b
test build and push
abnerrizzi Aug 10, 2023
2e299ae
test build and push
abnerrizzi Aug 10, 2023
1c7759d
test build and push
abnerrizzi Aug 10, 2023
3fbc49a
test build and push
abnerrizzi Aug 10, 2023
bba3c45
test build and push
abnerrizzi Aug 10, 2023
a5eb2fa
test build and push
abnerrizzi Aug 10, 2023
94619dd
test build and push
abnerrizzi Aug 10, 2023
ea50061
test build and push
abnerrizzi Aug 10, 2023
2f38876
test build and push
abnerrizzi Aug 10, 2023
20e2164
test build and push
abnerrizzi Aug 10, 2023
2cd7bbc
test build and push
abnerrizzi Aug 10, 2023
6c1f0ae
test build and push
abnerrizzi Aug 10, 2023
95fd798
test build and push
abnerrizzi Aug 10, 2023
d0d55d4
test build and push
abnerrizzi Aug 10, 2023
c1ea2a9
test build and push
abnerrizzi Aug 10, 2023
2cabdb5
test build and push
abnerrizzi Aug 10, 2023
971038e
test build and push
abnerrizzi Aug 10, 2023
ed6af61
test build and push
abnerrizzi Aug 10, 2023
9b98b20
testing
abnerrizzi Aug 10, 2023
8a2dbc8
testing
abnerrizzi Aug 10, 2023
7dcf77b
testing
abnerrizzi Aug 10, 2023
2e7af5d
testing
abnerrizzi Aug 10, 2023
f5bbb36
testing
abnerrizzi Aug 10, 2023
d0c4ea4
testing
abnerrizzi Aug 10, 2023
b0cf787
testing
abnerrizzi Aug 10, 2023
1c894ec
testing
abnerrizzi Aug 10, 2023
54755d7
testing
abnerrizzi Aug 10, 2023
e56263f
testing
abnerrizzi Aug 10, 2023
dbfa48b
testing
abnerrizzi Aug 10, 2023
5d6a433
testing
abnerrizzi Aug 10, 2023
a852a23
Delete Dockerfile.base
abnerrizzi Aug 10, 2023
e7a0698
merge (#3)
abnerrizzi Dec 25, 2023
9233c70
Merge remote-tracking branch 'origin/master' into feat-gh-action
abnerrizzi Jan 1, 2024
8cc3d5f
Merge remote-tracking branch 'upstream/master' into feat-gh-action
abnerrizzi Jun 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .github/workflows/build-push-ghcr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Build and Push

on:
push:
branches:
- main
- development
- feat*
tags:
- "v*"
pull_request:
branches:
- master

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
docker-build:
permissions:
contents: read
packages: write
runs-on: ubuntu-latest
steps:

- name: Setting environment variables
run: |
echo "repo_name=${{ env.IMAGE_NAME }}" >> $GITHUB_ENV

- uses: actions/checkout@v3

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY}}/${{ env.repo_name }}
flavor: latest=true
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}

- name: Login to image repository
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
file: Dockerfile
push: ${{ github.ref_type == 'tag' || github.ref_name == 'main' || startsWith(github.ref_name, 'feat-')}}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}