Skip to content

Commit c4eaa30

Browse files
committed
update workflows
1 parent bea07ca commit c4eaa30

3 files changed

Lines changed: 26 additions & 120 deletions

File tree

.github/workflows/publish-php8.yml

Lines changed: 0 additions & 46 deletions
This file was deleted.

.github/workflows/publish-px2c.yml

Lines changed: 0 additions & 46 deletions
This file was deleted.

.github/workflows/publish.yml

Lines changed: 26 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,42 @@
11
name: Build and Publish Docker
22

33
on:
4+
workflow_dispatch:
45
push:
56
branches:
6-
- main
7+
- px2c
8+
9+
permissions:
10+
contents: read
11+
packages: write
712

813
jobs:
9-
build_and_push:
14+
build-and-push:
1015
runs-on: ubuntu-latest
11-
env:
12-
IMAGE_NAME: rep2
16+
strategy:
17+
matrix:
18+
platform:
19+
- linux/amd64
20+
- linux/arm64
1321
steps:
14-
- name: Checkout
15-
uses: actions/checkout@v2
16-
17-
- name: Set up QEMU
18-
uses: docker/setup-qemu-action@v1
19-
20-
- name: Set up Docker Buildx
21-
uses: docker/setup-buildx-action@v1
22-
23-
- name: Login to DockerHub
24-
uses: docker/login-action@v1
22+
- uses: actions/checkout@v6
23+
with:
24+
ref: 'px2c'
25+
- uses: docker/setup-qemu-action@v3
26+
- uses: docker/setup-buildx-action@v3
27+
- uses: docker/login-action@v3
2528
with:
26-
username: ${{ secrets.DOCKERHUB_USERNAME }}
29+
username: ${{ vars.DOCKERHUB_USERNAME }}
2730
password: ${{ secrets.DOCKERHUB_TOKEN }}
28-
29-
- name: Login to GitHub Container Registry
30-
uses: docker/login-action@v1
31+
- uses: docker/login-action@v3
3132
with:
3233
registry: ghcr.io
33-
username: ${{ github.repository_owner }}
34-
password: ${{ secrets.CR_PAT }}
35-
36-
- name: Build and push
37-
uses: docker/build-push-action@v2
34+
username: ${{ github.actor }}
35+
password: ${{ secrets.GITHUB_TOKEN }}
36+
- uses: docker/build-push-action@v6
3837
with:
39-
context: .
4038
platforms: linux/amd64,linux/arm64
41-
push: true
4239
tags: |
43-
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:latest
44-
ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:latest
40+
${{ vars.DOCKERHUB_USERNAME }}/rep2:px2c
41+
ghcr.io/${{ github.actor }}/rep2:px2c
42+
push: true

0 commit comments

Comments
 (0)