Skip to content

Commit ab8bb88

Browse files
authored
Fix GitHub actions (#24)
* Fix actions * Fix GH password and permissions * Only release new image on certain path updates * Add git as a requirement * Remove Docker hub
1 parent 71dd8c1 commit ab8bb88

File tree

4 files changed

+34
-35
lines changed

4 files changed

+34
-35
lines changed

.github/workflows/build.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ on:
99
jobs:
1010
build:
1111
if: ${{ github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'push' }}
12-
runs-on: ubuntu-20.04
12+
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout this repo
15-
uses: actions/checkout@v2
15+
uses: actions/checkout@v4
1616
with:
1717
submodules: recursive
1818
- name: Checkout baserom
19-
uses: actions/checkout@v2
19+
uses: actions/checkout@v4
2020
with:
2121
repository: mkst/conker-private
2222
token: ${{ secrets.PRIVATE_REPO_ACCESS }}
@@ -25,30 +25,30 @@ jobs:
2525
run: echo ${{ secrets.CONKER_BASEROM_US }} | openssl enc -d -aes-256-cbc -pass stdin -pbkdf2 -in baserom/baserom.us.z64.aes -out baserom.us.z64
2626

2727
- name: Perform make extract (rom)
28-
uses: docker://docker.io/markstreet/conker:latest
28+
uses: docker://ghcr.io/mkst/conker:latest
2929
with:
3030
args: make extract
3131

3232
- name: Perform make extract (code)
33-
uses: docker://docker.io/markstreet/conker:latest
33+
uses: docker://ghcr.io/mkst/conker:latest
3434
with:
3535
args: sh -c "cd conker && make extract"
3636
- name: Perform make (code)
37-
uses: docker://docker.io/markstreet/conker:latest
37+
uses: docker://ghcr.io/mkst/conker:latest
3838
with:
3939
args: sh -c "cd conker && make --jobs"
4040
- name: Perform make replace
41-
uses: docker://docker.io/markstreet/conker:latest
41+
uses: docker://ghcr.io/mkst/conker:latest
4242
with:
4343
args: sh -c "cd conker && make replace"
4444

4545
- name: Perform make
46-
uses: docker://docker.io/markstreet/conker:latest
46+
uses: docker://ghcr.io/mkst/conker:latest
4747
with:
4848
args: make --jobs
4949

5050
- name: Create progress.csv
51-
uses: docker://docker.io/markstreet/conker:latest
51+
uses: docker://ghcr.io/mkst/conker:latest
5252
with:
5353
args: sh -c "cd conker && make progress"
5454

@@ -63,12 +63,13 @@ jobs:
6363

6464
- name: Push progress.csv to conker-website repo
6565
if: ${{ github.event_name == 'push' }}
66-
uses: dmnemec/copy_file_to_another_repo_action@v1.0.4
66+
uses: dmnemec/copy_file_to_another_repo_action@bbebd3da22e4a37d04dca5f782edd5201cb97083
6767
env:
6868
API_TOKEN_GITHUB: ${{ secrets.WEBSITE_REPO_ACCESS }}
6969
with:
7070
source_file: "${{ steps.vars.outputs.progress_filename }}"
7171
destination_repo: 'mkst/conker-website'
7272
destination_folder: 'progress/data'
73+
destination_branch: 'master'
7374
user_email: 'streetster@gmail.com'
7475
user_name: 'mkst'

.github/workflows/build_pr.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,42 +7,42 @@ on:
77
jobs:
88
build_pr:
99
if: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
10-
runs-on: ubuntu-20.04
10+
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout this repo
13-
uses: actions/checkout@v2
13+
uses: actions/checkout@v4
1414
with:
1515
submodules: recursive
1616
ref: ${{ github.event.pull_request.head.ref }}
1717
repository: ${{ github.event.pull_request.head.repo.full_name }}
1818
- name: Checkout baserom
19-
uses: actions/checkout@v2
19+
uses: actions/checkout@v4
2020
with:
2121
repository: mkst/conker-private
2222
token: ${{ secrets.PRIVATE_REPO_ACCESS }}
2323
path: baserom
2424
- name: Decrypt baserom
2525
run: echo ${{ secrets.CONKER_BASEROM_US }} | openssl enc -d -aes-256-cbc -pass stdin -pbkdf2 -in baserom/baserom.us.z64.aes -out baserom.us.z64
2626

27-
- name: Perform make extract
28-
uses: docker://docker.io/markstreet/conker:latest
27+
- name: Perform make extract (rom)
28+
uses: docker://ghcr.io/mkst/conker:latest
2929
with:
3030
args: make extract
3131

3232
- name: Perform make extract (code)
33-
uses: docker://docker.io/markstreet/conker:latest
33+
uses: docker://ghcr.io/mkst/conker:latest
3434
with:
3535
args: sh -c "cd conker && make extract"
3636
- name: Perform make (code)
37-
uses: docker://docker.io/markstreet/conker:latest
37+
uses: docker://ghcr.io/mkst/conker:latest
3838
with:
3939
args: sh -c "cd conker && make --jobs"
4040
- name: Perform make replace
41-
uses: docker://docker.io/markstreet/conker:latest
41+
uses: docker://ghcr.io/mkst/conker:latest
4242
with:
4343
args: sh -c "cd conker && make replace"
4444

4545
- name: Perform make
46-
uses: docker://docker.io/markstreet/conker:latest
46+
uses: docker://ghcr.io/mkst/conker:latest
4747
with:
4848
args: make --jobs

.github/workflows/docker.yaml

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,30 @@ name: Create and push Docker build image
22
on:
33
push:
44
branches: [ master ]
5+
paths:
6+
- Dockerfile
7+
- packages.txt
8+
- requirements.txt
9+
- .bash_aliases
10+
- .github/workflows/docker.yaml
511
jobs:
612
push_to_dockerhub:
7-
name: Publish Docker build image to Docker Hub + Github Registry
13+
name: Publish Docker build image to Github Registry
814
runs-on: ubuntu-latest
915
permissions:
1016
contents: read
17+
packages: write
1118
steps:
1219
- name: Check out the repo
13-
uses: actions/checkout@v2
14-
- name: Log in to Docker Hub
15-
uses: docker/login-action@v1
16-
with:
17-
username: ${{ secrets.DOCKERHUB_USERNAME }}
18-
password: ${{ secrets.DOCKERHUB_TOKEN }}
19-
- name: Log in to GitHub Docker Registry
20-
uses: docker/login-action@v1
20+
uses: actions/checkout@v4
21+
- name: Log in to GitHub Container Registry
22+
uses: docker/login-action@v3
2123
with:
2224
registry: ghcr.io
2325
username: ${{ github.repository_owner }}
24-
password: ${{ secrets.GHCR_PAT }}
25-
- name: Build and push to Docker Hub
26-
uses: docker/build-push-action@v2
27-
with:
28-
push: true
29-
tags: markstreet/conker:latest
26+
password: ${{ secrets.GITHUB_TOKEN }}
3027
- name: Build and push to Github registry
31-
uses: docker/build-push-action@v2
28+
uses: docker/build-push-action@v6
3229
with:
3330
push: true
3431
tags: ghcr.io/${{ github.repository_owner }}/conker:latest

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ attrs
33
capstone
44
colorama
55
cxxfilt
6+
git
67
pycparser
78
pylibyaml
89
pynacl

0 commit comments

Comments
 (0)