2121 - name : Get current date
2222 id : date
2323 run : |
24- echo "DATE={ $(date +'%Y%m%d')} " >> $GITHUB_ENV
24+ echo "DATE=$(date +'%Y%m%d')" >> $GITHUB_ENV
2525
2626 - uses : docker/metadata-action@v5
2727 id : metadata
@@ -35,58 +35,62 @@ jobs:
3535 labels : |
3636 maintainer=${{ github.repository_owner }}
3737
38- # - uses: docker/setup-buildx-action@v3
39-
40- # - uses: docker/login-action@v3
41- # with:
42- # registry: ghcr.io
43- # username: ${{ github.repository_owner }}
44- # password: ${{ secrets.GITHUB_TOKEN }}
45-
46- # - uses: docker/build-push-action@v6
47- # with:
48- # context: .
49- # platforms: linux/amd64
50- # push: true
51- # tags: ${{ steps.metadata.outputs.tags }}
52- # labels: ${{ steps.metadata.outputs.labels }}
53- # build-args: |
54- # BASE_IMAGE=ubuntu:${{ matrix.version }}
55-
56- # build-centos7:
57- # runs-on: ubuntu-latest
58- # permissions:
59- # contents: read
60- # packages: write
61-
62- # steps:
63- # - uses: actions/checkout@v4
64-
65- # - uses: docker/metadata-action@v5
66- # id: metadata
67- # with:
68- # images: |
69- # ghcr.io/${{ github.repository_owner }}/xs-env
70- # tags: |
71- # centos7
72- # centos7-${{ github.sha }}
73- # labels: |
74- # maintainer=${{ github.repository_owner }}
75-
76- # - uses: docker/setup-buildx-action@v3
77-
78- # - uses: docker/login-action@v3
79- # with:
80- # registry: ghcr.io
81- # username: ${{ github.repository_owner }}
82- # password: ${{ secrets.GITHUB_TOKEN }}
83-
84- # - uses: docker/build-push-action@v6
85- # with:
86- # context: .
87- # platforms: linux/amd64
88- # push: true
89- # tags: ${{ steps.metadata.outputs.tags }}
90- # labels: ${{ steps.metadata.outputs.labels }}
91- # build-args: |
92- # BASE_IMAGE=ubuntu:${{ matrix.version }}
38+ - uses : docker/setup-buildx-action@v3
39+
40+ - uses : docker/login-action@v3
41+ with :
42+ registry : ghcr.io
43+ username : ${{ github.repository_owner }}
44+ password : ${{ secrets.GITHUB_TOKEN }}
45+
46+ - uses : docker/build-push-action@v6
47+ with :
48+ context : .
49+ platforms : linux/amd64
50+ push : true
51+ tags : ${{ steps.metadata.outputs.tags }}
52+ labels : ${{ steps.metadata.outputs.labels }}
53+ build-args : |
54+ BASE_IMAGE=ubuntu:${{ matrix.version }}
55+
56+ build-centos7 :
57+ runs-on : ubuntu-latest
58+ permissions :
59+ contents : read
60+ packages : write
61+
62+ steps :
63+ - uses : actions/checkout@v4
64+
65+ - name : Get current date
66+ id : date
67+ run : |
68+ echo "DATE=$(date +'%Y%m%d')" >> $GITHUB_ENV
69+
70+ - uses : docker/metadata-action@v5
71+ id : metadata
72+ with :
73+ images : |
74+ ghcr.io/${{ github.repository_owner }}/xs-env
75+ tags : |
76+ centos7
77+ centos7-${{ env.DATE }}
78+ labels : |
79+ maintainer=${{ github.repository_owner }}
80+
81+ - uses : docker/setup-buildx-action@v3
82+
83+ - uses : docker/login-action@v3
84+ with :
85+ registry : ghcr.io
86+ username : ${{ github.repository_owner }}
87+ password : ${{ secrets.GITHUB_TOKEN }}
88+
89+ - uses : docker/build-push-action@v6
90+ with :
91+ context : .
92+ platforms : linux/amd64
93+ push : true
94+ tags : ${{ steps.metadata.outputs.tags }}
95+ labels : ${{ steps.metadata.outputs.labels }}
96+ file : ./centos7.Dockerfile
0 commit comments