-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update publish workflow, remove testing workflow
- Loading branch information
1 parent
ccb5278
commit 13bc0b6
Showing
4 changed files
with
53 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
FROM opensuse/tumbleweed | ||
|
||
# system upgrade and install ansible dependencies | ||
USER root | ||
RUN zypper ref && zypper dup --no-confirm | ||
RUN zypper install --no-confirm \ | ||
git \ | ||
ansible \ | ||
python311 \ | ||
python311-pip \ | ||
sudo \ | ||
openssh \ | ||
gum \ | ||
vim | ||
|
||
# # solve image-specific dependency problem by replacing busybox-which | ||
RUN zypper install --no-confirm --force-resolution xdg-utils | ||
|
||
# add insecure password | ||
RUN echo "root:dotfiles" | chpasswd | ||
|
||
# add ansible-user for real-world permissions | ||
RUN useradd -m ansible-user | ||
ENV HOME /home/ansible-user | ||
RUN chown -R ansible-user:ansible-user $HOME | ||
|
||
# add ansible user to sudoers file for pipelines | ||
RUN echo "ansible-user ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/ansible-user > /dev/null | ||
|
||
# switch to ansible-user | ||
USER ansible-user | ||
ENV USER ansible-user | ||
|
||
# copy repo | ||
RUN mkdir $HOME/git | ||
COPY . $HOME/git/dotfiles | ||
WORKDIR $HOME/git/dotfiles | ||
|
||
# for gum colors | ||
ENV TERM xterm-256color | ||
|
||
RUN ansible-playbook main.yml | ||
|
||
CMD /usr/local/bin |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,13 +26,19 @@ jobs: | |
uses: docker/[email protected] | ||
with: | ||
images: ${{ github.repository }} | ||
tags: | | ||
type=ref,event=branch | ||
type=ref,event=pr | ||
type=semver,pattern={{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
type=semver,pattern={{major}} | ||
type=sha | ||
- name: Build and push Docker image | ||
uses: docker/[email protected] | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
file: ./.github/scripts/Dockerfile | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters