@@ -31,99 +31,77 @@ jobs:
31
31
name : build
32
32
path : build
33
33
34
- deploy-test :
34
+ build-push-docker :
35
35
needs : build
36
36
if : github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
37
37
runs-on : ubuntu-latest
38
- environment :
39
- name : techradar-test-aoe
40
- url : http://techradar-test-aoe.s3-website.eu-central-1.amazonaws.com/techradar/
41
- permissions :
42
- id-token : write
43
- contents : read
44
38
steps :
45
- - name : Configure AWS Credentials
46
- uses : aws-actions/configure-aws-credentials@master
39
+ - name : Login to GitHub Container Registry
40
+ uses : docker/login-action@v3
47
41
with :
48
- aws-region : eu-central-1
49
- role-to-assume : arn:aws:iam::511165248623:role/github_techradar
50
- role-session-name : GitHubActions
42
+ registry : ghcr.io
43
+ username : ${{ github.actor }}
44
+ password : ${{ secrets.GITHUB_TOKEN }}
45
+ - name : Set up QEMU
46
+ uses : docker/setup-qemu-action@v3
47
+ - name : Set up Docker Buildx
48
+ uses : docker/setup-buildx-action@v3
51
49
- name : Download Artifact
52
50
uses : actions/download-artifact@v4
53
51
with :
54
52
name : build
55
53
path : build
56
- - run : ' aws s3 sync --delete build/ s3://techradar-test-aoe/techradar/'
57
-
58
- deploy :
59
- needs : build
60
- if : github.ref == 'refs/heads/main'
61
- runs-on : ubuntu-latest
62
- environment :
63
- name : techradar
64
- url : https://www.aoe.com/techradar/
65
- permissions :
66
- id-token : write
67
- contents : read
68
- steps :
69
- - name : Configure AWS Credentials
70
- uses : aws-actions/configure-aws-credentials@master
71
- with :
72
- aws-region : eu-central-1
73
- role-to-assume : arn:aws:iam::511165248623:role/github_techradar
74
- role-session-name : GitHubActions
75
- - name : Download Artifact
76
- uses : actions/download-artifact@v4
54
+ - name : Build and push
55
+ uses : docker/build-push-action@v6
77
56
with :
78
- name : build
79
- path : build
80
- - run : ' aws s3 sync --delete build/ s3:// techradar-prod-aoe/techradar/ '
57
+ context : .
58
+ push : true
59
+ tags : ghcr.io/aoepeople/ techradar:latest
81
60
82
- # deploy:
83
- # runs-on: ubuntu-20.04
84
- # if: github.ref == 'refs/heads/main'
61
+ # deploy-test:
85
62
# needs: build
63
+ # if: github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
64
+ # runs-on: ubuntu-latest
86
65
# environment:
87
- # name: techradar
88
- # url: https://www.aoe.com/techradar/index.html
66
+ # name: techradar-test-aoe
67
+ # url: http://techradar-test-aoe.s3-website.eu-central-1.amazonaws.com/techradar/
68
+ # permissions:
69
+ # id-token: write
70
+ # contents: read
89
71
# steps:
72
+ # - name: Configure AWS Credentials
73
+ # uses: aws-actions/configure-aws-credentials@master
74
+ # with:
75
+ # aws-region: eu-central-1
76
+ # role-to-assume: arn:aws:iam::511165248623:role/github_techradar
77
+ # role-session-name: GitHubActions
90
78
# - name: Download Artifact
91
- # uses: actions/download-artifact@v3
79
+ # uses: actions/download-artifact@v4
92
80
# with:
93
81
# name: build
94
82
# path: build
95
- # - uses: jakejarvis/s3-sync-action@master
96
- # with:
97
- # args: --acl public-read
98
- # env:
99
- # AWS_S3_BUCKET: "techradar.aoe.com"
100
- # AWS_ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY }}
101
- # AWS_SECRET_ACCESS_KEY: ${{ secrets.ACCESS_SECRET }}
102
- # AWS_REGION: "eu-central-1"
103
- # SOURCE_DIR: "build"
104
- # DEST_DIR: "techradar"
83
+ # - run: 'aws s3 sync --delete build/ s3://techradar-test-aoe/techradar/'
105
84
#
106
- # deploy-dev:
107
- # runs-on: ubuntu-20.04
108
- # if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
85
+ # deploy:
109
86
# needs: build
87
+ # if: github.ref == 'refs/heads/main'
88
+ # runs-on: ubuntu-latest
110
89
# environment:
111
- # name: techradar-next
112
- # url: http://techradar-next.aoe.com.s3.eu-central-1.amazonaws.com/techradar/index.html
90
+ # name: techradar
91
+ # url: https://www.aoe.com/techradar/
92
+ # permissions:
93
+ # id-token: write
94
+ # contents: read
113
95
# steps:
114
- # - run: echo "WARNING! THIS DEPLOYS A STAGING ENV, RERUN THIS JOB TO GET YOUR CHANGES DEPLOYED TO STAGING"
96
+ # - name: Configure AWS Credentials
97
+ # uses: aws-actions/configure-aws-credentials@master
98
+ # with:
99
+ # aws-region: eu-central-1
100
+ # role-to-assume: arn:aws:iam::511165248623:role/github_techradar
101
+ # role-session-name: GitHubActions
115
102
# - name: Download Artifact
116
- # uses: actions/download-artifact@v3
103
+ # uses: actions/download-artifact@v4
117
104
# with:
118
105
# name: build
119
106
# path: build
120
- # - uses: jakejarvis/s3-sync-action@master
121
- # with:
122
- # args: --acl public-read
123
- # env:
124
- # AWS_S3_BUCKET: "techradar-next.aoe.com"
125
- # AWS_ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY }}
126
- # AWS_SECRET_ACCESS_KEY: ${{ secrets.ACCESS_SECRET }}
127
- # AWS_REGION: "eu-central-1"
128
- # SOURCE_DIR: "build"
129
- # DEST_DIR: "techradar"
107
+ # - run: 'aws s3 sync --delete build/ s3://techradar-prod-aoe/techradar/'
0 commit comments