This commit is contained in:
17
.ci/ubuntu_setup_docker.sh
Normal file
17
.ci/ubuntu_setup_docker.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
# Add Docker's official GPG key:
|
||||
sudo apt-get update
|
||||
sudo apt-get install ca-certificates curl
|
||||
sudo install -m 0755 -d /etc/apt/keyrings
|
||||
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
|
||||
sudo chmod a+r /etc/apt/keyrings/docker.asc
|
||||
|
||||
# Add the repository to Apt sources:
|
||||
echo \
|
||||
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
|
||||
$(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \
|
||||
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||
sudo apt-get update
|
||||
|
||||
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
|
||||
|
||||
sudo usermod -aG docker $(whoami)
|
@@ -35,7 +35,7 @@ jobs:
|
||||
|
||||
- name: Install prerequisites
|
||||
run: |
|
||||
bash .ci/debian_setup_docker.sh
|
||||
bash .ci/ubuntu_setup_docker.sh
|
||||
|
||||
- name: Build Docker image
|
||||
run: |
|
||||
@@ -45,9 +45,16 @@ jobs:
|
||||
--tag ${{ env.SLUG }}:${{ env.DATE }} \
|
||||
--tag ${{ env.SLUG }}:latest
|
||||
|
||||
# - name: Deploy to Container Registry
|
||||
# if: github.ref == 'refs/heads/master' && github.event_name == 'push'
|
||||
# run: |
|
||||
# echo "${{ secrets.GHCR_TOKEN }}" | docker login git.carlpearson.net -u cwpearson --password-stdin
|
||||
# docker push ${{ env.SLUG }}:latest
|
||||
# docker push ${{ env.SLUG }}:${{ env.DATE }}
|
||||
|
||||
- name: Deploy to Container Registry
|
||||
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
|
||||
run: |
|
||||
echo "${{ secrets.GHCR_TOKEN }}" | docker login git.carlpearson.net -u cwpearson --password-stdin
|
||||
docker login git.carlpearson.net -u cwpearson
|
||||
docker push ${{ env.SLUG }}:latest
|
||||
docker push ${{ env.SLUG }}:${{ env.DATE }}
|
||||
|
Reference in New Issue
Block a user